:root {
  color-scheme: light;
  --paper: #f8f4e9;
  --sheet: #fffcf2;
  --ink: #203722;
  --muted: #526451;
  --line: #d9d9c4;
  --leaf: #254a32;
  --leaf-hover: #173822;
  --soft-leaf: #e7ecda;
  --accent: #b1be98;
  --focus: #a14426;
  --yellow: #f5d489;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  accent-color: var(--leaf);
}
:root[data-theme="teahouse"] {
  --paper: #faf2e7;
  --sheet: #fff8ee;
  --ink: #492610;
  --muted: #704b36;
  --line: #e3d3bf;
  --leaf: #60351f;
  --leaf-hover: #462311;
  --soft-leaf: #f3d7b2;
  --accent: #d99b58;
  --focus: #8a4421;
  --yellow: #f4d1a3;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; -webkit-tap-highlight-color: transparent; }
button, input, textarea, .print-actions a { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; flex: none; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 7.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.036em; }
h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -.025em; }
p { line-height: 1.6; overflow-wrap: anywhere; }
.topbar { padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1060px; min-height: 64px; margin: auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0; border: 0; color: var(--ink); background: transparent; font: 800 1.3rem/1 var(--serif); white-space: nowrap; }
.brand-mark { background: var(--leaf); color: #fcf8e7; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; }
.brand-mark svg { width: 21px; height: 21px; }
.header-location {
  min-width: 0;
  max-width: 44%;
  overflow: hidden;
  color: var(--muted);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main { max-width: 1000px; margin-inline: auto; padding: clamp(18px, 4vw, 42px) 18px calc(98px + env(safe-area-inset-bottom)); }
.boot { margin: 2rem 0; color: var(--muted); }
.welcome { display: grid; align-items: center; gap: 26px; }
.welcome-art { width: 100%; aspect-ratio: 1.43; object-fit: cover; object-position: 50% 52%; border-radius: 16px; background: var(--soft-leaf); }
.welcome-content { padding: 0 3px; }
.welcome-content h1 { max-width: 10em; }
.welcome-content p { margin-top: 12px; color: var(--muted); max-width: 27em; }
.welcome-actions { margin-top: 24px; display: grid; gap: 9px; }
.capture-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.capture-choice {
  --capture-background: var(--sheet);
  --capture-tint: var(--soft-leaf);
  --capture-ink: var(--leaf);
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--capture-background);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.capture-choice-moment {
  --capture-background: #f8eddc;
  --capture-tint: #eed4ad;
  --capture-ink: #633f24;
  border-color: #e2cba9;
}
.capture-camera, .capture-library {
  background: transparent;
  border: 0;
  color: var(--capture-ink);
  text-align: start;
}
.capture-camera {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
  padding: 12px 10px 10px;
  border-radius: 13px 13px 0 0;
}
.capture-camera:hover:enabled, .capture-library:hover:enabled { background: var(--capture-tint); }
.capture-camera strong { margin-top: 4px; font: 800 1.25rem/1.2 var(--serif); }
.capture-camera span:last-child { font-size: .79rem; line-height: 1.55; }
.capture-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--capture-tint); }
.capture-icon svg { width: 20px; height: 20px; }
.capture-library { min-height: 44px; padding: 7px 10px; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; font-size: .85rem; font-weight: 640; }
.capture-samples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.capture-samples button { color: var(--muted); font-size: .81rem; font-weight: 600; }
.primary, .secondary, .quiet, .icon-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 680;
  line-height: 1.18;
}
.primary { background: var(--leaf); color: #fffbed; }
.primary:hover:enabled { background: var(--leaf-hover); }
.secondary { background: var(--sheet); border-color: var(--line); color: var(--ink); }
.secondary:hover:enabled, .quiet:hover { background: var(--soft-leaf); }
.park-join { min-height: 44px; padding: 8px 11px; border-radius: 11px; font-size: .82rem; white-space: nowrap; }
.quiet { background: transparent; color: var(--leaf); text-decoration: none; }
.icon-button { width: 46px; padding: 8px; border-color: var(--line); background: var(--sheet); color: var(--ink); }
.caption { color: var(--muted); font-size: .875rem; }
.navigation { z-index: 2; position: fixed; inset: auto 0 0; display: flex; justify-content: center; gap: 6px; background: var(--sheet); border-top: 1px solid var(--line); padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); }
.navigation button { position: relative; display: grid; gap: 3px; justify-items: center; align-content: center; border: 0; color: var(--muted); background: transparent; border-radius: 13px; min-height: 60px; width: min(31%, 152px); font-weight: 620; font-size: .77rem; }
.navigation button[aria-current="page"] { color: var(--ink); background: var(--soft-leaf); }
.sheet { width: min(100%, 620px); margin-inline: auto; }
.section-heading { margin-bottom: 22px; }
.section-heading p, .sheet > p { margin-top: 9px; color: var(--muted); }
.prepare { display: grid; gap: 17px; }
.prepare-heading { display: flex; align-items: center; gap: 12px; }
.prepare-heading h1 { font-size: clamp(1.95rem, 6.8vw, 3.1rem); }
.photo-preview { height: clamp(180px, 48vw, 310px); width: 100%; border-radius: 14px; object-fit: contain; background: var(--soft-leaf); }
.photo-preview[hidden] + .photo-preview-note { display: block; }
.photo-preview-note { display: none; }
label { display: grid; gap: 7px; font-size: .94rem; font-weight: 680; }
input[type="text"] { width: 100%; background: var(--sheet); color: var(--ink); border: 1px solid #919d88; border-radius: 9px; padding: 12px; min-height: 48px; font-size: 16px; }
.capture-fields { display: grid; gap: 13px; }
.field-optional { margin-left: 4px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.field-actions { display: grid; gap: 7px; }
.photo-replace-actions { display: flex; justify-content: center; gap: 8px; }
.birth-prepare { gap: 14px; }
.birth-prepare .photo-preview { height: clamp(136px, 42vw, 240px); }
.birth-tradition { min-width: 0; margin: 0; padding: 0; border: 0; }
.birth-tradition legend { margin-bottom: 8px; padding: 0; font-size: .94rem; font-weight: 680; }
.birth-tradition-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.birth-tradition label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--sheet);
  cursor: pointer;
}
.birth-tradition label:has(:checked) { border-color: #79917b; background: var(--soft-leaf); }
.birth-tradition input { margin: 0; width: 15px; height: 15px; flex: none; }
.birth-tradition:disabled label { opacity: .66; cursor: wait; }
.pixel-avatar, .birth-coordinate img { image-rendering: pixelated; }
.pet-motion-canvas {
  position: absolute;
  inset: 0;
  visibility: hidden;
  scale: 1.14286;
  pointer-events: none;
}
.pet-motion-canvas.pixel-avatar { scale: 1.22222; }
.pet-motion-canvas[data-motion-ready="true"] { visibility: visible; }
.pet-motion-canvas[data-motion-ready="true"] + img { opacity: 0; }
.birth-screen {
  display: grid;
  gap: 15px;
  width: min(100%, 440px);
  margin-inline: auto;
}
.birth-card {
  border: 1px solid #c8b88d;
  border-radius: 16px;
  background: #fff9e8;
  overflow: hidden;
}
.birth-card-back {
  position: relative;
  display: grid;
  min-height: clamp(280px, 92vw, 380px);
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 30px 26px;
  background: #294936;
  color: #f8efd7;
  text-align: center;
}
.birth-card-back::before, .birth-card-back::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid #b7a778;
  border-radius: 10px;
}
.birth-card-back::before { inset: 11px; }
.birth-card-back::after { inset: 16px; border-color: #627052; border-radius: 8px; }
.birth-card-back svg {
  box-sizing: content-box;
  width: 42px;
  height: 42px;
  padding: 16px;
  margin-bottom: 6px;
  border: 1px solid #b7a778;
  border-radius: 50%;
  color: #e8c87b;
}
.birth-card-back h1 { font-size: clamp(2rem, 10vw, 3rem); }
.birth-card-back p { color: #e3d9b9; font-size: .92rem; }
.birth-card-front { animation: birth-reveal .36s cubic-bezier(.18,.81,.25,1) both; }
@keyframes birth-reveal {
  from { opacity: .65; transform: perspective(700px) rotateY(-12deg) translateY(5px); }
  to { opacity: 1; transform: perspective(700px) rotateY(0) translateY(0); }
}
.birth-art {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 12px 14px;
  background: #e3ebd8 url("assets/plaza-map.webp") center 53% / 300% auto;
}
.birth-art h1 {
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid #c8b88d;
  border-radius: 9px;
  background: #fff9e8;
  font-size: clamp(1.43rem, 6vw, 2rem);
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.birth-portrait-stage { position: relative; width: 144px; height: 144px; }
.birth-portrait-stage :is(.birth-portrait, .pet-motion-canvas) { width: 100%; height: 100%; object-fit: contain; }
.birth-details { padding: 14px clamp(12px, 5vw, 22px) 16px; }
.birth-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .68fr);
  gap: 7px;
  margin: 0;
}
.birth-facts > div + div { padding-left: 12px; border-left: 1px solid #d8c9a8; }
.birth-facts dt, .birth-coordinate p { color: #566856; font-size: .79rem; }
.birth-facts dd { margin: 3px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.birth-habit { margin-top: 8px; font-size: .88rem; }
.birth-coordinate {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #d8c9a8;
}
.birth-coordinate > div { min-width: 0; }
.birth-coordinate img { width: 76px; height: 76px; flex: none; }
.birth-coordinate code { display: block; margin-top: 4px; font-size: .79rem; letter-spacing: .02em; overflow-wrap: anywhere; }
.birth-continue { justify-self: stretch; min-height: 49px; }
.riverbend-return { display: inline-grid; min-height: 44px; padding-inline: 12px; place-items: center; color: var(--ink); text-decoration: none; white-space: nowrap; }
.riverbend-return[hidden] { display: none; }
.riverbend-pet-link { display: inline-grid; min-height: 44px; place-items: center; text-decoration: none; }
.pet-layout { display: grid; align-items: center; gap: 22px; }
.pet-stage { position: relative; aspect-ratio: 1.15; display: grid; place-items: center; border-radius: 16px; background: var(--soft-leaf); background-image: radial-gradient(ellipse at 50% 40%, #fff9de 0, #dfe8cd 72%); overflow: hidden; }
.pet-stage :is(img, .pet-motion-canvas) { width: 88%; height: 88%; max-height: 380px; object-fit: contain; filter: drop-shadow(0 9px 8px #1c431f25); }
.pet-stage .pet-motion-canvas { margin: auto; }
.pet-layout-scene .pet-stage { aspect-ratio: 1.32; grid-template-rows: minmax(0, 1fr); }
.pet-content > p { margin-top: 10px; color: var(--muted); }
.pet-actions { display: grid; gap: 8px; margin-top: 23px; }
.pet-origin {
  margin-top: 18px;
  padding: clamp(14px, 3vw, 19px);
  border: 1px solid #e2cba9;
  border-radius: 14px;
  background: #f8eddc;
  color: #53341e;
}
.origin-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.origin-heading time { font-size: .78rem; color: #6d5039; }
.origin-place { margin-top: 9px; font-weight: 720; }
.origin-story { margin-top: 7px; font-size: .94rem; }
.origin-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 13px; font-size: .78rem; color: #6d5039; }
.origin-palette ul { display: flex; gap: 5px; padding: 0; margin: 0; list-style: none; }
.origin-palette li { width: 24px; height: 24px; border-radius: 50%; background: var(--origin-color); border: 1px solid #53341e66; }
.pet-collection { margin-top: clamp(25px, 5vw, 42px); padding-top: 19px; border-top: 1px solid var(--line); }
.collection-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.collection-heading h2 { font-size: clamp(1.6rem, 5vw, 2.15rem); }
.collection-empty { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); color: var(--muted); font-size: .92rem; }
.collection-shelf { display: grid; gap: 20px; }
.collection-shelf section { min-width: 0; }
.collection-shelf h3 { margin-bottom: 9px; font-size: .95rem; font-weight: 690; }
.collection-finds, .collection-works { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.collection-finds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-finds > li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 82px;
  padding: 9px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
  font-size: .82rem;
  text-align: center;
}
.collection-finds img { width: 45px; height: 45px; object-fit: contain; }
.find-count {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 19px;
  padding: 2px 4px 1px;
  border-radius: 6px;
  background: var(--soft-leaf);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.collection-work {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 102px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--sheet);
  color: var(--ink);
  text-align: start;
}
.collection-work:hover { border-color: var(--accent); }
.collection-work:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.collection-work img { width: 96px; height: 72px; border-radius: 7px; background: var(--soft-leaf); object-fit: contain; }
.work-summary { display: grid; gap: 4px; padding-right: 4px; overflow-wrap: anywhere; }
.work-summary strong { font: 800 1.16rem/1.2 var(--serif); }
.work-summary > span { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.work-summary time { color: var(--muted); font-size: .71rem; font-variant-numeric: tabular-nums; }
.work-summary .work-meta { display: flex; flex-wrap: wrap; column-gap: 8px; color: var(--muted); font-size: .71rem; }
.notice, .form-error { border-radius: 9px; padding: 10px 13px; font-size: .9rem; line-height: 1.55; }
.form-error { background: #f5dbcf; color: #782b1a; }
.notice { background: var(--soft-leaf); color: var(--ink); }
body[data-page="park"] {
  --park-edge: clamp(10px, 2.5vw, 24px);
  --park-top: calc(10px + env(safe-area-inset-top));
  --park-left: max(var(--park-edge), env(safe-area-inset-left));
  --park-right: max(var(--park-edge), env(safe-area-inset-right));
  --park-bottom: calc(12px + env(safe-area-inset-bottom));
  --park-tools-bottom: var(--park-bottom);
  position: relative;
  overflow: hidden;
  overscroll-behavior: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background: #493921;
}
body[data-page="park"].has-navigation { --park-tools-bottom: calc(var(--park-bottom) + 65px); }
body[data-page="park"] .main {
  position: absolute;
  inset: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body[data-page="park"] .topbar {
  position: absolute;
  inset: var(--park-top) var(--park-right) auto var(--park-left);
  z-index: 5;
  padding: 0;
  border: 0;
  pointer-events: none;
}
body[data-page="park"] .topbar-inner { max-width: none; min-height: 44px; padding: 0; }
body[data-page="park"] .topbar-inner > * {
  pointer-events: auto;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: 0 2px 10px #21170833;
}
body[data-page="park"] .wordmark { gap: 6px; padding: 5px 9px 5px 5px; font-size: 1.02rem; }
body[data-page="park"] .brand-mark { width: 30px; height: 30px; }
body[data-page="park"] .brand-mark svg { width: 19px; height: 19px; }
body[data-page="park"] .header-location { padding: 9px 10px; }
body[data-page="park"] :is(.park-join, .park-find):hover,
body[data-page="park"] .park-find[aria-pressed="true"] { background: var(--soft-leaf); }
body[data-page="park"] .boot {
  position: absolute;
  left: var(--park-left);
  bottom: var(--park-bottom);
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sheet);
  font-size: .86rem;
}
body[data-page="park"] .navigation {
  position: absolute;
  inset: auto auto var(--park-bottom) 50%;
  width: min(318px, calc(100% - var(--park-left) - var(--park-right)));
  transform: translateX(-50%);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 3px 14px #2117083b;
}
body[data-page="park"] .navigation button { width: calc(100% / 3); min-height: 51px; border-radius: 11px; }
.plaza { position: absolute; inset: 0; }
.plaza-heading {
  position: absolute;
  top: calc(var(--park-top) + 52px);
  left: var(--park-left);
  z-index: 3;
}
.scene-picker {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: 0 2px 10px #21170833;
}
.scene-picker button {
  min-width: 52px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 640;
  white-space: nowrap;
}
.scene-picker button[aria-pressed="true"] {
  background: var(--soft-leaf);
  color: var(--ink);
}
.scene-picker button:hover { color: var(--ink); }
.scene-picker button:focus-visible { outline-offset: 0; }
.plaza-world-clock {
  position: absolute;
  z-index: 3;
  top: calc(var(--park-top) + 55px);
  right: var(--park-right);
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 37px;
  padding: 5px 10px 5px 8px;
  border: 1px solid #f4e8c94f;
  border-radius: 10px;
  background: #202c23f0;
  box-shadow: 0 2px 10px #161a1654;
  color: #faf1d9;
  font-size: .76rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
:root[data-theme="teahouse"] .plaza-world-clock { background: #38271eef; }
.plaza-world-icon { display: grid; color: #f0ce86; }
.plaza-world-icon span { display: flex; }
.plaza-world-icon :is([data-weather-icon="rain"], [data-weather-icon="water"], [data-weather-icon="snow"]) { color: #b4dee3; }
.plaza-world-icon svg { width: 17px; height: 17px; }
#plaza-world-season { margin-right: 5px; padding-right: 6px; border-right: 1px solid #f4e8c952; color: #f5e7c7; }
#plaza-world-time { font-weight: 730; font-variant-numeric: tabular-nums; }
#plaza-world-weather { margin-left: 5px; color: #f5e7c7; }
.plaza-mind-launch {
  position: absolute;
  z-index: 3;
  top: calc(var(--park-top) + 100px);
  right: var(--park-right);
  min-height: 44px;
  padding-inline: 9px 11px;
  border-radius: 11px;
  box-shadow: 0 2px 10px #21170833;
  font-size: .82rem;
  white-space: nowrap;
}
.plaza-mind-launch svg { width: 17px; height: 17px; }
:is(.preview-invite, .friends-invite) {
  position: absolute;
  z-index: 6;
  top: calc(var(--park-top) + 52px);
  right: var(--park-right);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 14px;
  width: min(350px, calc(100% - var(--park-left) - var(--park-right)));
  max-height: calc(100dvh - var(--park-top) - 72px);
  overflow-y: auto;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--sheet);
  box-shadow: 0 4px 14px #21170833;
}
:is(.preview-invite, .friends-invite) h2 { font-size: clamp(1.12rem, 4.6vw, 1.32rem); }
:is(.preview-invite, .friends-invite) p { margin-top: 5px; color: var(--muted); font-size: .87rem; }
.preview-invite .quiet { min-height: 44px; padding-inline: 6px; font-size: .84rem; }
.friends-invite {
  top: auto;
  bottom: calc(var(--park-tools-bottom) + 64px);
  display: grid;
  justify-items: start;
  gap: 10px;
  max-height: calc(100dvh - var(--park-top) - var(--park-tools-bottom) - 76px);
}
.friends-invite h2 { overflow-wrap: anywhere; }
.friends-invite h2:focus { outline: none; }
.friends-invite button { min-height: 44px; font-size: .88rem; }
.preview-note {
  padding: 6px 8px;
  border-radius: 8px;
  background: #272116f0;
  color: #fffbeb;
  font-size: .74rem;
}
.received-view .pet-collection { margin-top: 0; padding-top: 0; border: 0; }
.plaza-stage {
  --world-brightness: 1;
  --world-saturation: 1;
  --world-sepia: 0;
  --world-hue: 0deg;
  --season-matte: transparent;
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  background: #dfd2a6;
}
.plaza-stage[data-scene="teahouse"] { background: #493921; }
.plaza-stage[data-scene="plaza"] { background: #657745; }
.plaza-stage[data-season="spring"] { --season-matte: #ce9a9b34; }
.plaza-stage[data-season="summer"] { --season-matte: #4d8b4936; }
.plaza-stage[data-season="autumn"] { --season-matte: #af6f3d8c; }
.plaza-stage[data-season="winter"] { --season-matte: #a6bdcbda; }
.plaza-stage[data-map-mode="overview"]::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: linear-gradient(var(--season-matte), var(--season-matte)), url("assets/plaza-map.webp") center / cover;
  filter: blur(18px) brightness(calc(var(--world-brightness) * .67)) saturate(var(--world-saturation))
    sepia(var(--world-sepia)) hue-rotate(var(--world-hue));
  transition: filter 1.5s ease;
}
.plaza-stage[data-light="dawn"] { --world-brightness: .91; --world-saturation: 1.12; --world-sepia: .16; }
.plaza-stage[data-light="dusk"] { --world-brightness: .8; --world-saturation: 1.05; --world-sepia: .26; --world-hue: -11deg; }
.plaza-stage[data-light="night"] { --world-brightness: .61; --world-saturation: .74; --world-sepia: .21; --world-hue: 35deg; }
.plaza-stage[data-weather="rain"]:not([data-light="night"]) {
  --world-brightness: .78;
  --world-saturation: .86;
  --world-sepia: .08;
  --world-hue: 15deg;
}
.plaza-stage[data-weather="wet"][data-light="day"] { --world-brightness: .97; --world-saturation: 1.15; }
.plaza-stage[data-weather="snow"]:not([data-light="night"]) {
  --world-brightness: .92;
  --world-saturation: .83;
  --world-sepia: .03;
  --world-hue: 0deg;
}
.plaza-stage[data-scene="teahouse"] { --world-brightness: .99; --world-saturation: .97; --world-sepia: 0; --world-hue: 0deg; }
.plaza-stage[data-scene="teahouse"][data-light="dusk"] { --world-brightness: .94; --world-saturation: 1.05; }
.plaza-stage[data-scene="teahouse"][data-light="night"] { --world-brightness: .86; --world-saturation: .95; }
.plaza-stage[data-scene="teahouse"]:is([data-weather="rain"], [data-weather="snow"]):not([data-light="night"]) {
  --world-brightness: .94; --world-saturation: .95; --world-sepia: 0; --world-hue: 0deg;
}
.plaza-stage[data-map-mode="close"] { cursor: grab; touch-action: none; user-select: none; }
.plaza-stage[data-map-dragging="true"] { cursor: grabbing; }
.plaza-stage:focus-visible { outline: 3px solid var(--sheet); outline-offset: -4px; }
.plaza-map-plane { position: absolute; inset: 0; }
.plaza-stage[data-scene="plaza"] .plaza-map-plane { inset: 0 auto auto 0; }
.plaza-stage[data-map-follow="true"][data-map-mode="close"] .plaza-map-plane { transition: transform .92s linear; }
.plaza-backdrop { position: absolute; display: block; inset: 0; }
.plaza-backdrop[data-scene="plaza"] { pointer-events: none; }
.plaza-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--world-brightness, 1)) saturate(var(--world-saturation, 1))
    sepia(var(--world-sepia, 0)) hue-rotate(var(--world-hue, 0deg));
  transition: filter 1.5s ease;
}
.plaza-backdrop[data-scene="plaza"] .plaza-art { image-rendering: pixelated; }
.plaza-map-plane .plaza-backdrop[data-scene="plaza"] .plaza-art { object-fit: fill; }
.plaza-season-art { object-fit: fill; image-rendering: pixelated; pointer-events: none; }
.plaza-stage[data-season="winter"] .plaza-backdrop[data-scene="teahouse"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% -56%, #c4eef45c 0, #a5ceda21 48%, transparent 66%);
}
.plaza-world-effects, .plaza-world-effects > div {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.plaza-stage[data-scene="teahouse"] .plaza-world-effects { display: none; }
.plaza-world-effects::before, .plaza-world-effects::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.15s ease;
}
.plaza-world-effects::before { background: linear-gradient(#34518b51, #152b471f 70%); }
.plaza-stage[data-light="night"] .plaza-world-effects::before { opacity: 1; }
.plaza-world-effects::after {
  inset: -250px;
  background:
    radial-gradient(ellipse 1px 7px at 22px 31px, #d8f1f0b8 69%, transparent 100%) 0 0 / 124px 114px,
    radial-gradient(ellipse 1px 5px at 77px 104px, #c2e7eb95 67%, transparent 100%) 0 0 / 124px 114px,
    radial-gradient(ellipse 1px 6px at 109px 63px, #e9fbf8a9 69%, transparent 100%) 0 0 / 124px 114px,
    radial-gradient(ellipse 1px 8px at 52px 72px, #d0eded73 65%, transparent 100%) 0 0 / 124px 114px;
  transform: rotate(16deg);
}
.plaza-stage[data-weather="rain"] .plaza-world-effects::after { opacity: .78; animation: plaza-rain-fall .72s linear infinite; }
@keyframes plaza-rain-fall { to { transform: rotate(16deg) translateY(114px); } }
.plaza-world-effects > div { opacity: 0; transition: opacity 1.3s ease; }
.plaza-stage:is([data-weather="rain"], [data-weather="wet"]) .plaza-world-puddles { opacity: .9; }
.plaza-world-effects i { position: absolute; transform: translate(-50%, -50%); }
.plaza-world-puddles i {
  width: clamp(18px, 4.3%, 64px);
  aspect-ratio: 4.5 / 1;
  background: linear-gradient(#46657268 18%, #92c4c19c 19% 34%, #628c979c 35% 71%, #7ba3b58a 72%);
  clip-path: polygon(0 37%, 9% 37%, 9% 16%, 33% 16%, 33% 0, 72% 0, 72% 15%, 92% 15%, 92% 32%, 100% 32%,
    100% 68%, 89% 68%, 89% 83%, 70% 83%, 70% 100%, 25% 100%, 25% 83%, 8% 83%, 8% 60%, 0 60%);
}
.plaza-world-puddles i::after {
  content: "";
  position: absolute;
  inset: 25% 25%;
  border-radius: 50%;
  border: 1px solid #f4ffffab;
  opacity: .15;
}
.plaza-stage[data-weather="rain"] .plaza-world-puddles i::after { animation: plaza-ripple 2.5s ease-out infinite; }
.plaza-world-puddles i:nth-child(1) { left: 48.2%; top: 66.5%; }
.plaza-world-puddles i:nth-child(2) { left: 37.5%; top: 47.2%; width: 3%; }
.plaza-world-puddles i:nth-child(3) { left: 72.8%; top: 46.5%; width: 3.4%; }
.plaza-world-puddles i:nth-child(2)::after { animation-delay: -.8s; }
.plaza-world-puddles i:nth-child(3)::after { animation-delay: -1.6s; }
@keyframes plaza-ripple { from { transform: scale(.12); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.plaza-stage:is([data-light="dusk"], [data-light="night"]) .plaza-world-lanterns { opacity: .97; }
.plaza-world-lanterns i {
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe2a5b3 0, #ffd38459 19%, #f8aa5024 47%, transparent 70%);
}
.plaza-world-lanterns i:nth-child(1) { left: 76.5%; top: 26.1%; }
.plaza-world-lanterns i:nth-child(2) { left: 92.2%; top: 26.9%; }
.plaza-world-lanterns i:nth-child(3) { left: 84.4%; top: 30.8%; }
.plaza-world-lanterns i:nth-child(4) {
  left: 48.5%;
  top: 50.3%;
  width: 12%;
  background: radial-gradient(ellipse, #a9e8e659, #79cedb28 37%, transparent 70%);
}
.plaza-world-lanterns i:nth-child(5) {
  left: 56.3%;
  top: 35%;
  width: 6.6%;
  background: radial-gradient(circle, #ffe8a7ca 0, #ffd7846b 21%, #f4aa4a28 48%, transparent 71%);
}
.plaza-world-lanterns i:nth-child(5)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(4px, 8%, 8px);
  aspect-ratio: 3 / 4;
  background: #ffda8c;
  box-shadow: 0 2px #8f622f, 0 -2px #8f622f, 0 0 6px 2px #ffcb6d6e;
}
.plaza-stage[data-light="night"]:not([data-weather="rain"], [data-season="winter"]) .plaza-world-fireflies { opacity: .88; }
.plaza-world-fireflies i { width: 3px; height: 3px; background: #ffe9a2; box-shadow: 0 0 8px 3px #ffdc6b80; }
.plaza-world-fireflies i:nth-child(1) { left: 38.9%; top: 40.8%; }
.plaza-world-fireflies i:nth-child(2) { left: 44.1%; top: 73.8%; }
.plaza-world-fireflies i:nth-child(3) { left: 65.7%; top: 49%; }
.plaza-world-fireflies i:nth-child(4) { left: 31%; top: 70%; }
.plaza-stage[data-light="night"]:not([data-weather="rain"], [data-season="winter"]) .plaza-world-fireflies i { animation: plaza-firefly 5s ease-in-out infinite alternate; }
.plaza-world-fireflies i:nth-child(even) { animation-delay: -2.2s !important; }
@keyframes plaza-firefly { to { transform: translate(8px, -13px); opacity: .23; } }
.plaza-season-particles {
  --particle-color: #ffe0de;
  --particle-highlight: #fff1e8;
  --particle-duration: 9s;
  --particle-fall: 90px;
}
.plaza-stage[data-season="autumn"] .plaza-season-particles {
  --particle-color: #e48143;
  --particle-highlight: #f1b853;
  --particle-duration: 7s;
}
.plaza-stage[data-weather="snow"] .plaza-season-particles {
  --particle-color: #f4fbff;
  --particle-highlight: #d4effa;
  --particle-duration: 6s;
  --particle-fall: 166px;
}
.plaza-stage:is([data-season="spring"], [data-season="autumn"]):not([data-weather="rain"]) .plaza-season-particles,
.plaza-stage[data-weather="snow"] .plaza-season-particles { opacity: .85; }
.plaza-season-particles i {
  width: 3px;
  height: 3px;
  background: var(--particle-color);
  box-shadow: 1px 1px var(--particle-highlight);
}
.plaza-season-particles i:nth-child(1) { left: 32%; top: 19%; --particle-delay: -1s; }
.plaza-season-particles i:nth-child(2) { left: 43%; top: 27%; --particle-delay: -4s; }
.plaza-season-particles i:nth-child(3) { left: 54%; top: 15%; --particle-delay: -2.3s; }
.plaza-season-particles i:nth-child(4) { left: 62%; top: 39%; --particle-delay: -6s; }
.plaza-season-particles i:nth-child(5) { left: 47%; top: 50%; --particle-delay: -3.4s; }
.plaza-season-particles i:nth-child(6) { left: 53%; top: 71%; --particle-delay: -2s; }
.plaza-season-particles i:nth-child(7) { left: 15%; top: 63%; --particle-delay: -.6s; }
.plaza-season-particles i:nth-child(8) { left: 82%; top: 44%; --particle-delay: -5.4s; }
.plaza-season-particles i:nth-child(9) { left: 64%; top: 77%; --particle-delay: -4.8s; }
.plaza-season-particles i:nth-child(10) { left: 40%; top: 66%; --particle-delay: -1.7s; }
.plaza-stage:is([data-season="spring"], [data-season="autumn"]):not([data-weather="rain"]) .plaza-season-particles i,
.plaza-stage[data-weather="snow"] .plaza-season-particles i {
  animation: plaza-season-fall var(--particle-duration) linear var(--particle-delay) infinite;
}
@keyframes plaza-season-fall {
  0% { transform: translate(-26px, -24px) rotate(-20deg); opacity: 0; }
  21% { opacity: .9; }
  64% { transform: translate(27px, calc(var(--particle-fall) * .64)) rotate(90deg); opacity: .75; }
  100% { transform: translate(8px, var(--particle-fall)) rotate(170deg); opacity: 0; }
}
.is-backgrounded .plaza-world-effects i, .is-backgrounded .plaza-world-effects i::after,
.is-backgrounded .plaza-world-effects::after { animation-play-state: paused !important; }
.plaza-project-site {
  position: absolute;
  width: clamp(60px, 6.5%, 130px);
  transform: translate(-50%, -72%);
  pointer-events: none;
}
.plaza-project-site canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: brightness(var(--world-brightness, 1)) saturate(var(--world-saturation, 1));
  transition: filter 1.5s ease;
}
.plaza-project-marker {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  border: 1px solid #a89770;
  border-radius: 5px;
  background: #f9edca;
  color: #433a2c;
  box-shadow: 0 1px 3px #2f29183d;
  font-size: .7rem;
  font-weight: 720;
  line-height: 1.2;
  white-space: nowrap;
}
.plaza-project-site[data-complete="true"] .plaza-project-marker { background: #e8efce; border-color: #82916c; }
.plaza-project-site[data-flag="tilted"] .plaza-project-marker { background: #fae0cb; border-color: #ad785a; }
.plaza-pets { position: absolute; inset: 0; padding: 0; margin: 0; list-style: none; }
.plaza-pets.is-stale { opacity: .55; }
.plaza-pet {
  position: absolute;
  display: grid;
  width: min(clamp(62px, 22vmin, 144px), 34vh);
  width: min(clamp(62px, 22vmin, 144px), 34dvh);
  justify-items: center;
  transform: translate(-50%, -100%) scale(var(--depth, 1));
  transform-origin: center bottom;
  transition: left .98s linear, top .98s linear;
}
.plaza-stage[data-scene="plaza"] .plaza-pet { width: var(--map-pet-size, 36px); }
.plaza-stage[data-scene="plaza"] .plaza-avatar { -webkit-user-drag: none; }
.plaza-sprite { width: 100%; position: relative; isolation: isolate; }
.plaza-sprite::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: auto 17% 3% 17%;
  height: 13%;
  border-radius: 50%;
  background: #2f2918;
  opacity: .18;
  filter: blur(4px);
}
.plaza-avatar, .plaza-motion-canvas {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center bottom;
  transform: scaleX(var(--facing, 1));
  transform-origin: center bottom;
  filter: drop-shadow(0 2px 2px #3a4a2460);
}
.plaza-motion-canvas { height: 100%; transform-origin: center; }
.plaza-avatar { animation: pet-breathe 2.9s ease-in-out infinite alternate; }
.plaza-pet[data-motion="walk"] .plaza-avatar { animation: pet-step .52s ease-in-out infinite alternate; }
.plaza-pet[data-motion="social"] .plaza-avatar { animation: pet-step .42s ease-out 4 alternate; }
.plaza-pet[data-motion="rest"] .plaza-avatar { animation-duration: 3.8s; }
.plaza-motion-canvas[data-motion-ready="true"] + .plaza-avatar { animation: none; }
@keyframes pet-breathe {
  from { transform: scaleX(var(--facing, 1)) scaleY(.977); }
  to { transform: scaleX(var(--facing, 1)) scaleY(1.015); }
}
@keyframes pet-step {
  from { transform: translateY(0) scaleX(var(--facing, 1)) scaleY(.96); }
  to { transform: translateY(-4px) scaleX(var(--facing, 1)); }
}
.plaza-pet:is([data-motion="splash"], [data-motion="puddle"]) .plaza-sprite::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 65%;
  height: 18%;
  left: 17.5%;
  bottom: 4%;
  border: 1.5px solid #c4eeec;
  border-radius: 50%;
  background: #70adac55;
  animation: pet-ripple 1.15s ease-out infinite;
}
.plaza-pet[data-motion="puddle"] .plaza-sprite::after { animation-duration: 2.1s; background: transparent; }
@keyframes pet-ripple {
  from { transform: scale(.65); opacity: .9; }
  to { transform: scale(1.45); opacity: 0; }
}
.plaza-pet:is([data-motion="tea"], [data-motion="sniff"], [data-motion="arcade"], [data-motion="craft"],
  [data-motion="build_bridge"], [data-motion="tilt_flag"], [data-motion="fix_flag"]) .plaza-sprite::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 24%;
  right: 15%;
  width: 3px;
  height: 3px;
  pointer-events: none;
  color: #fbdec4;
  background: currentColor;
  box-shadow: 3px -4px 0 -1px currentColor, 1px -8px 0 -1px currentColor;
  animation: pet-action-pixels 1.85s steps(4, end) infinite;
}
.plaza-pet[data-motion="sniff"] .plaza-sprite::after { color: #f5d189; animation-duration: 1.2s; }
.plaza-pet[data-motion="arcade"] .plaza-sprite::after { color: #e9ac63; animation-duration: .8s; }
.plaza-pet[data-motion="craft"] .plaza-sprite::after { color: #d3e4a4; animation-duration: 1.2s; }
.plaza-pet[data-motion="build_bridge"] .plaza-sprite::after { color: #d3b88f; animation-duration: .95s; }
.plaza-pet[data-motion="tilt_flag"] .plaza-sprite::after { color: #efaf8b; animation-duration: .75s; }
.plaza-pet[data-motion="fix_flag"] .plaza-sprite::after { color: #c9e5a1; animation-duration: 1.1s; }
@keyframes pet-action-pixels {
  0%, 100% { opacity: 0; transform: translateY(0); }
  25% { opacity: .9; }
  85% { opacity: 0; transform: translateY(-9px); }
}
.plaza-pets.is-stale .plaza-avatar, .is-backgrounded .plaza-avatar,
.plaza-pets.is-stale .plaza-sprite::after, .is-backgrounded .plaza-sprite::after { animation-play-state: paused; }
.plaza-pet-action {
  --activity-ink: #45654a;
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 2px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  transform: translateX(-50%);
  padding: 3px 6px;
  background: #fffbed;
  color: #24382c;
  border: 1px solid #c0ac7b;
  border-radius: 7px;
  box-shadow: 0 1px 3px #2f29183d;
  line-height: 1.25;
  font-size: .72rem;
  font-weight: 720;
  white-space: nowrap;
  pointer-events: none;
}
.plaza-pet-action::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--activity-ink);
  transform: rotate(45deg);
}
.plaza-pet:is([data-activity="splash"], [data-activity="rain"], [data-activity="snowball"]) .plaza-pet-action { --activity-ink: #517a8a; }
.plaza-pet[data-activity="blossom"] .plaza-pet-action { --activity-ink: #ad677a; }
.plaza-pet[data-activity="leafwatch"] .plaza-pet-action { --activity-ink: #a75e3c; }
.plaza-pet[data-motion="snowball"] .plaza-sprite::after {
  content: "";
  position: absolute;
  bottom: 4%;
  left: 67%;
  width: 16%;
  aspect-ratio: 1;
  background: linear-gradient(#fffff5 0 50%, #cbebf2 50% 78%, #8fb9c9 78%);
  clip-path: polygon(23% 0, 77% 0, 77% 16%, 100% 16%, 100% 83%, 77% 83%, 77% 100%, 23% 100%, 23% 83%, 0 83%, 0 16%, 23% 16%);
  transform-origin: 0 100%;
  animation: pet-roll-snow 1.4s steps(4, end) infinite alternate;
  pointer-events: none;
}
@keyframes pet-roll-snow { to { transform: translateX(35%) scale(1.18); } }
.plaza-pet:is([data-activity="tea"], [data-activity="craft"], [data-activity="arcade"]) .plaza-pet-action { --activity-ink: #9b6641; }
.plaza-pet:is([data-activity="build_bridge"], [data-activity="fix_flag"]) .plaza-pet-action { --activity-ink: #547556; }
.plaza-pet[data-activity="tilt_flag"] .plaza-pet-action { --activity-ink: #a6563d; }
.plaza-pet-name {
  display: block;
  min-width: 30px;
  max-width: 120%;
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(calc(-50% + var(--label-offset, 0px)));
  padding: 4px 6px;
  border-radius: 6px;
  background: #fffbebf2;
  color: #343929;
  box-shadow: 0 1px 4px #302d2628;
  font-size: .71rem;
  font-weight: 720;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.plaza-pet[data-demo="true"] .plaza-pet-name { background: #e5e0ce; }
.plaza-pet[data-own="true"] .plaza-pet-name { color: #fffbed; background: var(--leaf); }
.plaza-stage[data-scene="plaza"] .plaza-pet-name { font-size: .68rem; padding: 3px 5px; max-width: 94px; }
.plaza-stage[data-map-mode="overview"] .plaza-pet:not([data-own="true"]):not(:hover) .plaza-pet-name { visibility: hidden; }
.plaza-pet-speech {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 7px);
  left: 50%;
  display: -webkit-box;
  width: max-content;
  max-width: min(154px, 43vw);
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid #cfbb88;
  border-radius: 8px;
  background: #fff7dc;
  color: #2b3f30;
  box-shadow: 0 2px 6px #443b2840;
  transform: translateX(-50%);
  font-size: .74rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  pointer-events: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.plaza-pet:has(.plaza-pet-speech:not([hidden])) .plaza-pet-action { visibility: hidden; }
.plaza-pet[data-state="socializing"]::after {
  content: "♥";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  color: #9c3e36;
  background: #f6e4d3;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: .83rem;
}
.plaza-notice {
  position: absolute;
  z-index: 101;
  max-width: calc(100% - 28px);
  left: 50%;
  bottom: 15px;
  width: max-content;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--sheet);
  box-shadow: 0 1px 5px #3329152e;
  color: var(--muted);
  font-size: .84rem;
}
.plaza-arcade {
  position: absolute;
  z-index: 102;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #a97654;
  border-radius: 9px;
  background: #fff0d8;
  box-shadow: 0 3px 9px #37211570;
  color: #4a271a;
  font-size: .78rem;
  font-weight: 740;
  white-space: nowrap;
}
.plaza-arcade:hover { background: #ffe5c0; }
.arcade-mini {
  display: grid;
  place-items: center;
  width: 23px;
  height: 17px;
  padding: 2px;
  border: 1px solid #683026;
  border-radius: 3px;
  background: #a43e30;
  box-shadow: 0 2px #68302635;
}
.arcade-mini span {
  width: 100%;
  height: 100%;
  border: 1px solid #382725;
  border-radius: 2px;
  background: linear-gradient(0deg, #1d302e 32%, #698680 33%, #384b49 71%, #718d89 72%);
}
.arcade-dialog {
  width: min(440px, calc(100% - 22px));
  max-height: min(720px, calc(100% - 24px));
  padding: clamp(12px, 4vw, 19px);
  overflow-y: auto;
  border: 1px solid #a88160;
  border-radius: 16px;
  background: #fff5e5;
  color: #4a271a;
  box-shadow: 0 16px 42px #1c0f0bc9;
}
.arcade-dialog::backdrop { background: #21110ac2; }
.arcade-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.arcade-heading h2 { font-size: clamp(1.25rem, 5.5vw, 1.62rem); }
.arcade-close {
  flex: none;
  min-height: 44px;
  color: #623c28;
}
#arcade-description {
  margin: 1px 0 12px;
  color: #70503a;
  font-size: .86rem;
}
.arcade-tv {
  padding: clamp(7px, 2.7vw, 12px);
  border: 1px solid #672a1f;
  border-radius: 12px;
  background: #8a3529;
  box-shadow: inset 0 0 0 3px #c66046, 0 3px 6px #60332045;
}
.arcade-tv canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  outline: 4px solid #3f2924;
  border-radius: 4px;
  background: #142534;
  image-rendering: pixelated;
}
.arcade-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 12px;
  margin-top: 12px;
  color: #70503a;
  font-size: .82rem;
}
#arcade-score { color: #4a271a; font-weight: 700; font-variant-numeric: tabular-nums; }
.plaza-mind {
  width: min(calc(100% - 24px), 480px);
  max-height: min(calc(100dvh - 24px), 680px);
  max-height: min(calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px), 680px);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9c7a0;
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 14px 42px #18140970;
}
.plaza-mind::backdrop { background: #181a14a6; }
.plaza-mind-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--sheet);
}
.plaza-mind-header h2 { font-size: clamp(1.28rem, 5.7vw, 1.62rem); }
.plaza-mind-header .quiet { flex: none; min-height: 44px; padding-inline: 9px; font-size: .87rem; }
.plaza-mind-model { margin-top: 3px; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.plaza-mind-body { display: grid; gap: 14px; padding: 13px 15px 16px; }
.plaza-mind-choices, .plaza-mind-conversations ol { display: grid; gap: 9px; }
.plaza-mind-card, .plaza-mind-chat {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sheet);
  overflow-wrap: anywhere;
}
.plaza-mind-card-title, .plaza-mind-chat header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}
.plaza-mind-card-title h3 { font-size: 1rem; }
.plaza-mind-card-title small { margin-inline-start: 3px; color: var(--muted); font: 600 .72rem/1.2 var(--sans); white-space: nowrap; }
.plaza-mind-card-title span {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--soft-leaf);
  color: #355241;
  font-size: .72rem;
  font-weight: 650;
}
.plaza-mind-card-title span[data-mind-state="expired"] { background: #eee7d7; color: #5e5749; }
.plaza-mind-action { margin-top: 3px; font-size: .92rem; font-weight: 670; }
.plaza-mind-reason, .plaza-mind-status { margin-top: 3px; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.plaza-mind-memory, .plaza-mind-reply {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 7px;
  padding-left: 7px;
  border-left: 2px solid #98a587;
  color: #465647;
  font-size: .82rem;
  line-height: 1.5;
}
.plaza-mind-memory strong, .plaza-mind-reply strong { flex-shrink: 0; font-size: .75rem; }
.plaza-mind-conversations h3 { margin-bottom: 6px; font: 720 .87rem/1.34 var(--sans); }
.plaza-mind-conversations ol { margin: 0; padding: 0; list-style: none; }
.plaza-mind-chat header { font-size: .84rem; }
.plaza-mind-chat header span, .plaza-mind-chat header small { color: var(--muted); font-size: .73rem; font-weight: 450; }
.plaza-mind-chat blockquote { margin: 5px 0 0; font-size: .92rem; line-height: 1.46; }
.plaza-dock {
  position: absolute;
  z-index: 3;
  left: var(--park-left);
  right: var(--park-right);
  bottom: var(--park-tools-bottom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.plaza-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.plaza-view-tools { justify-content: flex-end; }
.plaza-dock button, .plaza-journal { pointer-events: auto; }
.plaza-dock > button, .plaza-tools > button { border-radius: 11px; font-size: .81rem; box-shadow: 0 2px 10px #21170833; }
.plaza-dock > button { min-height: 44px; white-space: nowrap; }
#plaza-zoom { min-height: 44px; white-space: nowrap; }
#plaza-zoom svg { width: 16px; height: 16px; }
.plaza-journal { position: relative; }
.plaza-journal summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--sheet);
  box-shadow: 0 2px 10px #21170833;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 680;
  cursor: pointer;
  list-style: none;
}
.plaza-journal summary::-webkit-details-marker { display: none; }
.plaza-journal summary svg { width: 17px; height: 17px; }
.plaza-journal summary:hover, .plaza-journal[open] summary { background: var(--soft-leaf); }
.plaza-diary-body {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 0;
  display: grid;
  align-items: start;
  gap: 8px;
  width: min(315px, calc(100vw - var(--park-left) - var(--park-right)));
  max-height: max(44px, calc(100dvh - var(--park-top) - var(--park-tools-bottom) - 112px));
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--sheet);
  box-shadow: 0 4px 14px #21170833;
}
.plaza-journal.has-photo .plaza-diary-body { grid-template-columns: minmax(0, 1.6fr) minmax(88px, 1fr); }
.plaza-journal p { font-size: .9rem; line-height: 1.48; }
.plaza-diary-current {
  grid-column: 1 / -1;
  padding-left: 8px;
  border-left: 2px solid #78917b;
  color: #3e5544;
}
.plaza-world-history { grid-column: 1 / -1; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.plaza-world-history h2 { font: 700 .85rem/1.25 var(--sans); }
.plaza-world-history ol { display: grid; gap: 7px; margin: 7px 0 0; padding: 0; list-style: none; }
.plaza-world-history li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px; align-items: baseline; font-size: .82rem; line-height: 1.45; }
.plaza-history-time { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.plaza-project-journal .plaza-project-status { margin-top: 5px; }
.plaza-project-journal .plaza-project-builders { margin-top: 3px; color: #3e5544; font-size: .82rem; }
.plaza-project-journal li { display: block; padding-left: 7px; border-left: 2px solid #c5b589; }
.plaza-diary-photo { min-width: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.diary-photo-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
}
.diary-photo-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  object-fit: cover;
  background: var(--soft-leaf);
}
.diary-photo-button span {
  padding: 5px 3px;
  border-radius: 9px;
  background: var(--soft-leaf);
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.25;
}
.diary-photo-button:hover span { text-decoration: underline; text-underline-offset: 3px; }
.picture-dialog {
  width: min(calc(100% - 28px), 570px);
  max-height: calc(100% - 28px);
  padding: 13px;
  border: 0;
  border-radius: 15px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 14px 36px #21170838;
}
.picture-dialog::backdrop { background: #181409a6; }
.picture-dialog form { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.picture-dialog img {
  width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  object-fit: contain;
  background: var(--soft-leaf);
}
.picture-dialog p { margin: 10px 4px 3px; }
.work-detail { width: min(calc(100% - 28px), 460px); }
.work-detail > form {
  position: sticky;
  z-index: 2;
  top: -13px;
  padding-block: 4px;
  background: var(--sheet);
}
.work-detail > form h2 { min-width: 0; overflow-wrap: anywhere; }
.work-detail > form button { flex: none; }
.work-detail > img { max-height: 38vh; }
.work-coordinate {
  margin-top: 15px;
  padding: 11px 11px 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.work-coordinate h3 { font-weight: 720; font-size: .94rem; }
.work-coordinate p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.work-coordinate-place { display: flex; flex-wrap: wrap; column-gap: 8px; }
.work-detail summary {
  min-height: 44px;
  padding: 10px 2px;
  cursor: pointer;
  color: var(--leaf);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.5;
}
.work-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-block: 4px 8px;
}
.work-copy-row textarea, .work-copy-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}
.work-copy-row textarea { resize: vertical; font-size: .79rem; overflow-wrap: anywhere; }
.work-copy-row button { padding-inline: 9px; white-space: nowrap; font-size: .83rem; }
.work-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block: 10px 5px; }
.work-reactions .caption { margin-right: 3px; }
.work-reactions button { min-height: 44px; padding: 7px 11px; font-size: .84rem; }
.work-reactions .secondary[aria-pressed="true"] { background: var(--leaf); color: var(--sheet); border-color: var(--leaf); }
.work-gift { margin-top: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-gift summary { padding-inline: 4px; }
.work-gift > p { margin: 0 4px 9px; color: var(--muted); font-size: .84rem; }
.work-gift-controls { padding: 0 4px 8px; }
.work-gift-controls label { font-size: .82rem; }
.work-gift-controls p { margin: 3px 0; }
.work-gift-options { display: flex; flex-wrap: wrap; gap: 0 6px; }
.work-gift-options button { padding-inline: 9px; font-size: .84rem; }
.work-feedback:empty { margin: 0; }
.work-feedback[data-error="true"] { color: #782b1a; }
.work-detail .work-detail-download { margin-top: 4px; padding-inline: 4px; }
.album-grid { display: grid; gap: 24px; }
.print { margin: 0; padding: 11px; border-radius: 13px; background: var(--sheet); border: 1px solid var(--line); }
.snapshot { border-radius: 6px; position: relative; aspect-ratio: 3 / 2; isolation: isolate; overflow: hidden; background: var(--soft-leaf); }
.scene, .snapshot-pet, .box-rim { position: absolute; }
.scene { width: 100%; height: 100%; object-fit: cover; }
.snapshot-pet { width: 43%; height: 68%; bottom: 18%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 3px 3px #35240236); }
.snapshot-pet.first { left: 10%; }
.snapshot-pet.second { right: 10%; }
.box-rim { width: 100%; height: 100%; object-fit: cover; inset: 0; }
.encounter-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--soft-leaf); border-radius: 6px; }
.photo-meta { display: flex; gap: 9px; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.print figcaption { padding: 13px 3px 5px; }
.print figcaption h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
.print figcaption p { color: var(--muted); font-size: .9rem; margin-top: 5px; }
.print-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.empty { margin-top: 20px; border-block: 1px solid var(--line); padding: 18px 0; color: var(--muted); }
.empty button { margin-top: 12px; }
.toast { position: fixed; z-index: 4; bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 36px); padding: 10px 14px; border-radius: 9px; background: var(--ink); color: #fffbed; box-shadow: 0 5px 16px #1c311e20; font-size: .875rem; }
.sr-only { position: absolute; padding: 0; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
@media (min-width: 650px) {
  .topbar-inner { min-height: 72px; padding-inline: 32px; }
  .main { padding-inline: 32px; }
  .welcome { grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 5vw, 57px); }
  .welcome-art { aspect-ratio: 1.35; }
  .pet-layout { grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 50px); }
  .collection-shelf { grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 24px; }
  .album-grid:not(:has(> :only-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="park"].has-navigation { --park-tools-bottom: var(--park-bottom); }
  .plaza-heading { top: var(--park-top); left: 50%; transform: translateX(-50%); }
}
@media (min-width: 820px) {
  .collection-works:not(:has(> :only-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 350px) {
  .main { padding-inline: 13px; }
  .scene-picker button { min-width: 47px; }
  .birth-art { padding-top: 14px; }
  .birth-portrait-stage { width: 108px; height: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .plaza-pet, .plaza-stage[data-map-follow="true"][data-map-mode="close"] .plaza-map-plane { transition: none; }
  .plaza-art, .plaza-stage[data-map-mode="overview"]::before, .plaza-world-effects > div, .plaza-world-effects::before,
  .plaza-world-effects::after, .plaza-project-site canvas { transition: none; }
}
