@import "https://fonts.googleapis.com/css2?family=Geist+Pixel&display=swap";

/* src/client/styles/base.css */
:root {
  --pixel: "Geist Pixel", monospace;
  --body: var(--pixel);
  --ink: #4b5940;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  background: #e7efcc;
  color: var(--ink);
  font: 14px/1.6 var(--body);
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #7b9863;
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}

/* src/client/styles/sanctuary.css */
#sanctuary {
  position: fixed;
  inset: 0;
  overflow: hidden;
  height: 100dvh;
}
#backyard {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
#roamers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hud {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  padding: calc(29px + env(safe-area-inset-top)) 24px 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}
.hud h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 400 30px/1.4 var(--pixel);
  margin: 0;
  color: #4c6340;
  letter-spacing: -1px;
  pointer-events: auto;
}
.glass-control {
  position: absolute;
  right: 28px;
  top: calc(25px + env(safe-area-inset-top));
  font: 13px var(--pixel);
  color: #526b43;
  background: transparent;
  border: 0;
  padding: 12px 0;
  min-height: 44px;
  pointer-events: auto;
}
.glass-control span {
  padding-left: 8px;
}
.glass-control:hover {
  color: #283f1d;
}
.census {
  position: fixed;
  z-index: 50;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 14px var(--pixel);
  color: #698053;
  pointer-events: none;
}
.census-star {
  display: none;
}

/* src/client/styles/cats.css */
.roamer {
  position: absolute;
  width: 90px;
  height: 80px;
  left: 0;
  top: 0;
  background: none;
  border: 0;
  padding: 0;
  pointer-events: auto;
  transform-origin: center bottom;
  will-change: transform;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.roamer svg {
  width: 84px;
  height: 66px;
  overflow: visible;
  image-rendering: pixelated;
}
.roamer::after {
  content: attr(data-name);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) scale(var(--label-scale, 1));
  transform-origin: center bottom;
  padding: 3px 8px;
  background: #fbfaeae8;
  color: #62754e;
  white-space: nowrap;
  font-size: 10.5px;
  opacity: 0;
  pointer-events: none;
}
.roamer:hover::after,
.roamer:focus-visible::after {
  opacity: 1;
}
.pose-walk {
  display: none;
}
.walking .pose-walk {
  display: inline;
}
.walking .pose-loaf {
  display: none;
}
.walking .legs-front {
  animation: front-paws 0.48s steps(1, end) infinite;
}
.walking .legs-back {
  animation: back-paws 0.48s steps(1, end) infinite;
}
.walking .torso {
  animation: body-step 0.48s steps(1, end) infinite;
}
.walking .tail {
  animation: tail 0.96s steps(1, end) infinite;
  transform-origin: 32px 17px;
}
.loafing .pose-loaf {
  animation: breathe 3s steps(1, end) infinite;
}
@keyframes front-paws {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2px, -1px);
  }
  50% {
    transform: translate(0, -1px);
  }
  75% {
    transform: translate(2px, 0);
  }
}
@keyframes back-paws {
  0%, 100% {
    transform: translate(0, -1px);
  }
  25% {
    transform: translate(2px, 0);
  }
  50% {
    transform: translate(0, 0);
  }
  75% {
    transform: translate(-2px, -1px);
  }
}
@keyframes body-step {
  25%, 75% {
    transform: translateY(-1px);
  }
}
@keyframes tail {
  50% {
    transform: translateX(1px);
  }
}
@keyframes breathe {
  50% {
    transform: translateY(-0.5px);
  }
}

/* src/client/styles/dialogs.css */
button,
input,
select,
textarea {
  font: inherit;
}
dialog {
  color: #526046;
  background: #fcfbf0;
  border: 1px solid #c9d3b4;
  padding: 30px;
  max-width: min(400px, calc(100% - 28px));
  width: 400px;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  box-shadow: 5px 5px 0 #9eb18238;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #63784a40;
  backdrop-filter: blur(3px);
}
.close {
  position: absolute;
  right: 4px;
  top: 3px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: #83916f;
  font-size: 24px;
}
.eyebrow {
  font-size: 10px;
  color: #929b83;
  display: block;
  margin: 0 0 10px;
}
h2 {
  font: 400 23px/1.3 var(--pixel);
  margin: 0 0 20px;
}
dialog p {
  font-size: 13px;
  color: #839073;
  margin: 12px 0;
}
.button {
  border: 1px solid #91a778;
  padding: 12px 16px;
  background: #819d66;
  color: #fffef0;
  min-height: 44px;
  font: 13px var(--pixel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.button:hover {
  background: #6f8b55;
}
.button.outline {
  background: transparent;
  color: #7f936c;
  border-color: #c4cfb5;
}
.button.small {
  font-size: 12px;
  padding: 8px 12px;
}
.full {
  width: 100%;
}
.text-btn {
  font: 12px var(--pixel);
  color: #8a9a79;
  border: 0;
  background: none;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-note {
  font-size: 11px !important;
  color: #9ba48c !important;
}
.form-error {
  font-size: 12px;
  color: #ad7b69;
  min-height: 18px;
  margin-top: 10px;
}
label {
  display: block;
  font-size: 12px;
  margin: 16px 0 6px;
}
input,
select,
textarea {
  font: 14px var(--pixel);
  padding: 11px 10px;
  border: 1px solid #ccd5bc;
  border-radius: 0;
  background: #fffef6;
  width: 100%;
  color: #526046;
  min-height: 44px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a7bb8c;
  outline-offset: 1px;
}
form .button {
  margin-top: 17px;
}
.human-check {
  margin-top: 15px;
  min-height: 65px;
  max-width: 100%;
  overflow: hidden;
}
.portrait {
  width: 100%;
  height: 170px;
  object-fit: cover;
  image-rendering: auto;
  margin-top: 18px;
}
.cat-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.badge {
  font-size: 11px;
  padding: 3px 7px;
  background: #edf1e2;
  color: #8b9877;
}
.detail-art {
  text-align: center;
  height: 130px;
  padding: 12px;
}
.detail-art svg {
  width: 150px;
  height: 110px;
  image-rendering: pixelated;
}
.admin-modal {
  width: 850px;
  max-width: calc(100% - 28px);
}
.admin-list {
  max-height: 45dvh;
  overflow: auto;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  border-bottom: 1px solid #dde4d0;
}
.admin-row small {
  display: block;
  font-size: 11px;
  color: #97a388;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.admin-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.inline-check {
  display: flex;
  gap: 12px;
  align-items: center;
}
.inline-check input {
  width: 20px;
  min-height: 24px;
}
.audit {
  padding: 15px 0;
  border-bottom: 1px solid #dde4d0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.audit pre {
  white-space: pre-wrap;
  font-size: 11px;
}
.member-art {
  width: 130px;
  margin: 10px auto;
}
.member-art svg {
  width: 100%;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 10px 17px;
  background: #fcfbf0;
  border: 1px solid #cad5b7;
  color: #7f9369;
  font-size: 13px;
  width: max-content;
  max-width: calc(100% - 32px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  text-align: center;
}
#toast.show {
  opacity: 1;
}

/* src/client/styles/responsive.css */
@media (max-width: 650px) {
  .hud {
    padding-top: calc(25px + env(safe-area-inset-top));
  }
  .hud h1 {
    font-size: 27px;
  }
  .glass-control {
    right: 20px;
    top: calc(73px + env(safe-area-inset-top));
    font-size: 12px;
  }
  .census {
    font-size: 13px;
  }
  .roamer {
    width: 68px;
    height: 64px;
  }
  .roamer svg {
    width: 63px;
    height: 50px;
  }
  dialog {
    padding: 27px 20px;
  }
  .human-check {
    margin-left: -6px;
    margin-right: -6px;
    max-width: calc(100% + 12px);
  }
  .admin-row {
    align-items: flex-start;
  }
}
@media (max-width: 350px) {
  .human-check {
    transform: scale(0.87);
    transform-origin: left top;
    width: 300px;
    max-width: none;
    margin-bottom: -9px;
  }
}
@media (max-height: 470px) and (min-width: 651px) {
  .hud {
    padding-top: 12px;
  }
  .hud h1 {
    font-size: 24px;
  }
  .glass-control {
    top: 7px;
  }
  .census {
    bottom: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* src/client/styles/main.css */
