:root {
  color-scheme: dark;
  background: #10141b;
  color: #eadfcb;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
.room {
  height: 100vh;
  height: 100dvh;
  min-height: 230px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: radial-gradient(ellipse at 50% 62%, #232a34, #10141b 72%);
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.title, footer { text-align: center; }
h1 { margin: 4px 0; font-size: 1.15rem; letter-spacing: .1em; font-weight: 650; }
h1 span { color: #aea395; font-size: .78em; font-weight: 450; }
.stage { position: relative; overflow: hidden; }
.pet {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.pet:active { cursor: grabbing; }
.pet canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.status { position: absolute; inset: 45% 0 auto; margin: 0; text-align: center; }
.hint { margin: 8px 0; color: #c4b8a8; font-size: .76rem; }
.controls { display: flex; justify-content: center; gap: 7px; }
.controls button {
  min-height: 42px;
  border: 1px solid #6e6253;
  border-radius: 999px;
  background: #1b2029;
  color: inherit;
  font: inherit;
  font-size: .83rem;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.controls button[aria-pressed="true"] { background: #3b3229; border-color: #bb9b71; }
button:focus-visible { outline: 2px solid #dfbb8b; outline-offset: 2px; }
@media (max-height: 420px) {
  .room { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .hint { margin: 3px 0; }
}
@media (max-width: 260px) {
  .room { padding-inline: 8px; }
  .controls { gap: 4px; }
  .controls button { padding-inline: 7px; font-size: .75rem; }
}
