:root {
  --night: #0c2026;
  --night-2: #15343a;
  --ink: #11282c;
  --paper: #f5ebd5;
  --paper-dim: #d7cdb7;
  --jade: #4f7f76;
  --jade-dark: #2c5856;
  --coral: #ef5a3c;
  --yellow: #f2c55c;
  --blue: #75b9c1;
  --line: #092228;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

.live-village,
.live-village * {
  box-sizing: border-box;
}

.live-village button,
.live-village a,
.live-village summary {
  -webkit-tap-highlight-color: transparent;
}

.live-village button,
.live-village summary {
  font: inherit;
}

.live-village button:focus-visible,
.live-village a:focus-visible,
.live-village summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.live-village [hidden] {
  display: none !important;
}

.live-village {
  position: relative;
  width: 100%;
  min-height: 100svh;
  height: 100dvh;
  overflow: hidden;
  color: var(--paper);
  background: var(--night);
  font-family: var(--sans);
  isolation: isolate;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--yellow);
}

.skip-link:focus {
  top: 12px;
}

.world-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: calc(68px + var(--safe-top));
  padding: var(--safe-top) 22px 0;
  border-bottom: 1px solid rgb(245 235 213 / 24%);
  background: rgb(12 32 38 / 92%);
  box-shadow: 0 12px 26px rgb(0 0 0 / 16%);
  backdrop-filter: blur(12px);
}

.world-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--paper);
  border: 1px solid rgb(245 235 213 / 35%);
  background: var(--coral);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 800;
  transform: rotate(-2deg);
}

.world-brand > span:last-child {
  display: grid;
  line-height: 1.05;
}

.world-brand strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .14em;
}

.world-brand small {
  margin-top: 6px;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
}

.world-now {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.world-now i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgb(239 90 60 / 15%);
  animation: live-breathe 2.2s ease-in-out infinite;
}

.world-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.tool-button,
.world-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 11px;
  color: var(--paper);
  border: 1px solid rgb(245 235 213 / 24%);
  background: rgb(245 235 213 / 6%);
  cursor: pointer;
}

.tool-button {
  gap: 7px;
}

.tool-button b {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
}

.tool-button:hover,
.world-menu summary:hover {
  background: rgb(245 235 213 / 13%);
}

.tool-button[aria-pressed="true"] {
  color: var(--night);
  border-color: var(--yellow);
  background: var(--yellow);
}

.world-menu {
  position: relative;
}

.world-menu summary {
  width: 42px;
  list-style: none;
  letter-spacing: .1em;
}

.world-menu summary::-webkit-details-marker {
  display: none;
}

.world-menu > div {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  min-width: 190px;
  padding: 7px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 7px 7px 0 rgb(3 15 18 / 28%);
}

.world-menu a {
  padding: 11px 12px;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.world-menu a:hover {
  color: var(--paper);
  background: var(--jade-dark);
}

.sandbox {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #37555a;
}

.sandbox::before {
  position: absolute;
  inset: calc(68px + var(--safe-top)) 0 28%;
  z-index: -5;
  background: #6f8886;
  content: "";
}

.sandbox::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  height: 36%;
  border-top: 4px solid #17383e;
  background: #31545a;
  box-shadow: inset 0 30px 60px rgb(5 27 32 / 28%);
  content: "";
}

.first-visit {
  position: absolute;
  top: calc(102px + var(--safe-top));
  left: 50%;
  z-index: 65;
  width: min(520px, calc(100% - 36px));
  padding: 16px 20px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgb(245 235 213 / 94%);
  box-shadow: 7px 7px 0 rgb(8 31 36 / 24%);
  text-align: center;
  transform: translateX(-50%);
  transition: opacity .5s ease, transform .5s ease;
}

.first-visit p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: .04em;
}

.first-visit small {
  display: block;
  margin-top: 6px;
  color: #4c5d5d;
  font-size: 10px;
  letter-spacing: .08em;
}

.first-visit.is-leaving {
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
}

.skyline {
  position: absolute;
  inset: calc(68px + var(--safe-top)) 0 auto;
  z-index: -2;
  height: 18%;
  background: #29464d;
}

.water-tank {
  position: absolute;
  bottom: 1px;
  width: 37px;
  height: 45px;
  border: 3px solid #102c33;
  border-radius: 7px 7px 2px 2px;
  background: #496c6d;
  box-shadow: inset 0 8px 0 rgb(245 235 213 / 12%);
}

.water-tank::before,
.water-tank::after {
  position: absolute;
  left: 3px;
  width: 25px;
  height: 2px;
  background: #183b41;
  content: "";
}

.water-tank::before { top: 13px; }
.water-tank::after { top: 28px; }
.tank-one { left: 22%; }
.tank-two { left: 66%; width: 42px; height: 50px; }

.antenna {
  position: absolute;
  right: 11%;
  bottom: 0;
  width: 3px;
  height: 85px;
  background: #112f36;
}

.antenna::before,
.antenna::after {
  position: absolute;
  left: -24px;
  width: 50px;
  height: 3px;
  background: #112f36;
  content: "";
}

.antenna::before { top: 18px; transform: rotate(12deg); }
.antenna::after { top: 35px; transform: rotate(-11deg); }

.power-line {
  position: absolute;
  top: 31px;
  width: 48%;
  height: 2px;
  background: #112f36;
  opacity: .8;
}

.line-one { left: -2%; transform: rotate(3deg); }
.line-two { right: -2%; transform: rotate(-4deg); }

.neighborhood {
  position: absolute;
  inset: 14% 0 31%;
  z-index: 0;
  display: grid;
  grid-template-columns: 28% 43% 29%;
  align-items: end;
  min-height: 340px;
  border-bottom: 7px solid #112e34;
}

.building {
  position: relative;
  height: 100%;
  border-right: 3px solid var(--line);
  border-left: 1px solid rgb(9 34 40 / 70%);
  background: #a4a08d;
  box-shadow: inset 0 -16px 0 rgb(11 42 48 / 14%);
}

.tailor-shop { height: 88%; background: #898f7e; }
.future-market { height: 100%; background: #a9a28c; }
.audio-house { height: 91%; background: #8e958d; }

.upper-floor {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 7%;
  height: 55%;
  padding: 6% 8%;
  border-bottom: 4px solid var(--line);
  background: #73847e;
}

.tiles-a { background: #819188; }
.tiles-b { background: #9c9985; }
.tiles-c { background: #768a84; }

.window {
  position: relative;
  display: block;
  width: 27%;
  height: 58%;
  min-height: 48px;
  border: 4px solid #19383d;
  background: #25454a;
  box-shadow: 5px 6px 0 rgb(7 30 35 / 18%);
}

.window i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;
  background: #17373d;
}

.window::after {
  position: absolute;
  right: 0;
  bottom: 14%;
  left: 0;
  height: 2px;
  background: #17373d;
  content: "";
}

.window-lit {
  background: #e7c875;
  box-shadow: 0 0 28px rgb(242 197 92 / 35%);
}

.window-flicker {
  animation: window-flicker 8s steps(1) infinite;
}

.aircon {
  position: absolute;
  right: 4%;
  bottom: 5%;
  width: 47px;
  height: 27px;
  border: 3px solid #213f43;
  background: #c2bdab;
}

.aircon::after {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 11px;
  height: 11px;
  border: 2px solid #516665;
  border-radius: 50%;
  content: "";
}

.aircon.second { right: 43%; }

.balcony {
  position: absolute;
  right: 5%;
  bottom: 3%;
  left: 5%;
  display: flex;
  justify-content: space-evenly;
  height: 30%;
  border: 3px solid #28474a;
  border-top: 7px solid #28474a;
}

.balcony i { width: 2px; background: #28474a; }

.awning {
  position: absolute;
  top: 53%;
  right: -5px;
  left: -5px;
  z-index: 3;
  height: 8%;
  min-height: 25px;
  border: 3px solid var(--line);
  box-shadow: 0 10px 10px rgb(3 21 25 / 24%);
  transform: skewX(-5deg);
}

.awning-green { background: var(--jade); }
.awning-red { background: #a84f3c; }

.shopfront {
  position: relative;
  height: 45%;
  padding: 6% 8%;
  background: #2b4d50;
}

.rolling-door {
  display: block;
  height: 100%;
  border: 4px solid #18383e;
  background: #6d807d;
  box-shadow: inset 0 9px 0 #667976, inset 0 18px 0 #7a8a86, inset 0 27px 0 #667976, inset 0 36px 0 #7a8a86, inset 0 45px 0 #667976;
}

.door-half { height: 64%; margin-top: 12%; }

.vertical-sign {
  position: absolute;
  top: 8%;
  right: 7%;
  z-index: 5;
  padding: 8px 6px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  writing-mode: vertical-rl;
}

.work-light {
  position: absolute;
  top: 17%;
  left: 13%;
  width: 40%;
  height: 8px;
  background: var(--yellow);
  box-shadow: 0 0 20px rgb(242 197 92 / 65%);
}

.market-sign {
  position: absolute;
  top: 50%;
  right: 8%;
  left: 8%;
  z-index: 4;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 14px;
  color: var(--paper);
  border: 3px solid var(--line);
  background: var(--coral);
  font-family: var(--serif);
  font-size: clamp(14px, 1.9vw, 25px);
  font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 6px 7px 0 rgb(8 32 38 / 25%);
}

.market-sign small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}

.market-bays {
  display: grid;
  grid-template-columns: 1fr .7fr 1fr;
  gap: 3px;
  height: 45%;
  padding: 8% 3% 0;
  background: #284b50;
}

.stair-gate {
  position: relative;
  display: block;
  border: 4px solid #102e34;
  background: #193c43;
}

.stair-gate::before,
.stair-gate::after,
.stair-gate i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #8b9385;
  content: "";
}

.stair-gate::before { left: 25%; }
.stair-gate i { left: 50%; }
.stair-gate::after { left: 75%; }
.door-open { background: #18343a; }
.door-open i { display: block; width: 55%; height: 9px; margin: 21% auto; background: #e8c96e; box-shadow: 0 0 22px rgb(242 197 92 / 48%); }

.small-sign {
  position: absolute;
  top: 4%;
  right: 8%;
  left: 8%;
  z-index: 4;
  padding: 7px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.audio-front { padding-top: 16%; }
.glass-door { display: block; width: 58%; height: 100%; margin-left: auto; border: 4px solid #15343a; background: #527277; box-shadow: inset 0 0 0 5px rgb(245 235 213 / 8%); }

.street-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.arcade-pillar {
  position: absolute;
  bottom: 27%;
  width: 24px;
  height: 38%;
  border: 3px solid var(--line);
  background: #8f8f7e;
  box-shadow: 8px 9px 0 rgb(7 29 34 / 18%);
}

.pillar-one { left: 28%; }
.pillar-two { left: 71%; }

.scooter {
  position: absolute;
  bottom: 17%;
  width: 74px;
  height: 32px;
  border: 3px solid #102e34;
  border-radius: 18px 26px 8px 8px;
  background: #934936;
  transform: skewX(-10deg);
}

.scooter::before,
.scooter::after {
  position: absolute;
  bottom: -14px;
  width: 23px;
  height: 23px;
  border: 5px solid #102e34;
  border-radius: 50%;
  background: #557076;
  content: "";
}

.scooter::before { left: 3px; }
.scooter::after { right: 3px; }
.scooter i { position: absolute; top: -23px; right: 13px; width: 10px; height: 28px; border: 3px solid #102e34; background: #637b7e; transform: rotate(14deg); }
.scooter b { position: absolute; top: -17px; left: 8px; width: 34px; height: 10px; border: 3px solid #102e34; border-radius: 9px; background: #172c31; }
.scooter-one { left: 5%; }
.scooter-two { right: 10%; bottom: 13%; background: #56736f; transform: scale(.83) skewX(-10deg); }

.plastic-chair {
  position: absolute;
  bottom: 26%;
  width: 34px;
  height: 32px;
  border: 4px solid #16343a;
  border-top-width: 10px;
  background: #33898b;
}

.plastic-chair::before,
.plastic-chair::after { position: absolute; bottom: -16px; width: 4px; height: 15px; background: #16343a; content: ""; }
.plastic-chair::before { left: 3px; }
.plastic-chair::after { right: 3px; }
.chair-one { left: 24%; }
.chair-two { right: 26%; background: #af5941; transform: scale(.83); }

.plant { position: absolute; bottom: 27%; width: 34px; height: 26px; border: 3px solid #18383e; background: #965a42; }
.plant i { position: absolute; bottom: 20px; width: 17px; height: 31px; border-radius: 55% 55% 20% 20%; background: #315f50; transform-origin: bottom; }
.plant i:nth-child(1) { left: 6px; transform: rotate(-35deg); }
.plant i:nth-child(2) { left: 13px; height: 39px; }
.plant i:nth-child(3) { left: 19px; transform: rotate(33deg); }
.plant-one { left: 2%; }
.plant-two { right: 3%; transform: scale(.85); }

.crate-stack { position: absolute; right: 31%; bottom: 28%; width: 48px; height: 29px; border: 3px solid #18383e; background: #9f7046; box-shadow: -29px 6px 0 -3px #8a603f, -29px 6px 0 0 #18383e; }

.puddle { position: absolute; z-index: 2; height: 13px; border: 1px solid rgb(181 227 230 / 40%); border-radius: 50%; background: rgb(113 185 193 / 22%); }
.puddle-one { right: 32%; bottom: 8%; width: 24%; transform: rotate(-2deg); }
.puddle-two { left: 12%; bottom: 12%; width: 17%; transform: rotate(3deg); }

.weather-rain {
  position: absolute;
  inset: 70px 0 0;
  z-index: 45;
  opacity: .22;
  pointer-events: none;
}

.weather-rain::before,
.weather-rain::after {
  position: absolute;
  top: -15%;
  left: 7%;
  width: 1px;
  height: 75px;
  background: #e4f2ed;
  box-shadow: 110px 110px 0 #e4f2ed, 230px 20px 0 #e4f2ed, 360px 180px 0 #e4f2ed, 480px 80px 0 #e4f2ed, 620px 240px 0 #e4f2ed, 750px 40px 0 #e4f2ed, 880px 155px 0 #e4f2ed, 1010px 25px 0 #e4f2ed, 1140px 210px 0 #e4f2ed, 1280px 70px 0 #e4f2ed, 1410px 260px 0 #e4f2ed;
  content: "";
  transform: rotate(13deg);
  animation: rain-fall 1.8s linear infinite;
}

.weather-rain::after {
  top: -25%;
  left: 1%;
  height: 45px;
  opacity: .55;
  animation-delay: -.8s;
  animation-duration: 1.25s;
}

.broadcast-machine {
  position: absolute;
  right: 3.5%;
  bottom: 24%;
  z-index: 24;
  width: 86px;
  height: 145px;
  color: var(--paper);
  filter: drop-shadow(8px 10px 0 rgb(6 27 32 / 25%));
}

.speaker {
  position: absolute;
  top: -42px;
  left: 22px;
  width: 54px;
  height: 36px;
  border: 4px solid #0e2d33;
  border-radius: 50% 10% 10% 50%;
  background: #d2c8af;
  transform: rotate(-5deg);
}

.speaker::after { position: absolute; top: -5px; right: -14px; width: 16px; height: 38px; border: 4px solid #0e2d33; border-radius: 4px; background: #546c6d; content: ""; }
.signal { position: absolute; top: 5px; right: 9px; z-index: 3; width: 12px; height: 12px; border: 2px solid #5d251a; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgb(239 90 60 / 20%); animation: signal-pulse 1.1s steps(2) infinite; }
.machine-screen { position: absolute; top: 22px; right: 8px; left: 8px; z-index: 3; display: grid; place-items: center; min-height: 38px; padding: 5px; color: #cbe3d1; border: 3px solid #0f2c32; background: #183f3b; font-family: var(--mono); font-size: 7px; line-height: 1.3; text-align: center; }
.machine-body { position: absolute; inset: 0; border: 5px solid #0e2d33; border-radius: 3px; background: #8a8c78; }
.machine-body i { position: absolute; bottom: 15px; width: 12px; height: 12px; border: 3px solid #15343a; border-radius: 50%; background: #d2c8af; }
.machine-body i:nth-child(1) { left: 9px; }
.machine-body i:nth-child(2) { left: 31px; }
.machine-body i:nth-child(3) { left: 53px; background: var(--yellow); }
.broadcast-machine.is-active { animation: machine-shake .22s linear 4; }

.toolbox,
.plan-table {
  position: absolute;
  z-index: 18;
  color: var(--paper);
  border: 3px solid #102e34;
  background: #77523b;
  font-family: var(--mono);
  font-size: 7px;
  text-align: center;
}

.toolbox { left: 19%; bottom: 28%; width: 54px; height: 29px; padding-top: 7px; }
.toolbox::before { position: absolute; top: -12px; left: 12px; width: 24px; height: 11px; border: 3px solid #102e34; border-bottom: 0; content: ""; }
.toolbox i { position: absolute; top: -5px; left: 12px; z-index: -1; padding: 3px 7px; color: var(--ink); border: 1px solid #543426; background: var(--paper); font-style: normal; white-space: nowrap; opacity: 0; transform: translateY(0) rotate(-4deg); transition: opacity .4s ease, transform .7s ease; }
.toolbox.is-active i { z-index: 2; opacity: 1; transform: translate(18px, -24px) rotate(7deg); }

.plan-table { right: 17%; bottom: 27%; width: 83px; height: 35px; padding-top: 9px; background: #6a4935; }
.plan-table::before,
.plan-table::after { position: absolute; bottom: -16px; width: 4px; height: 15px; background: #102e34; content: ""; }
.plan-table::before { left: 8px; }
.plan-table::after { right: 8px; }
.plan-table i { position: absolute; top: -4px; left: -5px; width: 92px; padding: 5px; color: var(--ink); border: 1px solid #6b5d49; background: var(--paper); font-style: normal; font-size: 6px; opacity: 0; transform: rotate(0); transition: opacity .5s ease, transform .6s ease; }
.plan-table.is-active i { opacity: 1; transform: translateY(-15px) rotate(-4deg); }

.residents-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.resident {
  --x: 50%;
  --y: 70%;
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 82px;
  height: 126px;
  margin: 0;
  padding: 0;
  color: var(--paper);
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  transition: top 2.15s cubic-bezier(.4, 0, .2, 1), left 2.15s cubic-bezier(.4, 0, .2, 1);
}

.resident::after {
  position: absolute;
  right: 8px;
  bottom: 3px;
  left: 8px;
  height: 12px;
  border: 1px solid rgb(145 211 208 / 22%);
  border-radius: 50%;
  background: rgb(4 24 29 / 28%);
  content: "";
}

.resident.is-walking .person {
  animation: person-walk .46s ease-in-out infinite alternate;
}

.resident.is-walking .legs i:first-child { animation: leg-left .46s ease-in-out infinite alternate; }
.resident.is-walking .legs i:last-child { animation: leg-right .46s ease-in-out infinite alternate; }
.resident[data-facing="left"] .person { transform: scaleX(-1); }

.resident.is-noticed::before {
  position: absolute;
  inset: 20px 4px 0;
  border: 2px solid rgb(242 197 92 / 70%);
  border-radius: 50%;
  content: "";
  animation: noticed-ring 1.5s ease-out 2;
}

.name-tag {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 8;
  padding: 3px 7px;
  color: var(--paper);
  border: 1px solid rgb(245 235 213 / 35%);
  background: rgb(12 32 38 / 88%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.person {
  position: absolute;
  right: 9px;
  bottom: 9px;
  left: 9px;
  height: 95px;
  transform-origin: 50% 90%;
}

.shadow { position: absolute; right: 7px; bottom: -3px; left: 7px; height: 9px; border-radius: 50%; background: rgb(4 23 28 / 35%); }
.legs { position: absolute; right: 17px; bottom: 7px; left: 17px; height: 36px; }
.legs i { position: absolute; bottom: 0; width: 9px; height: 38px; border: 3px solid #102d34; border-radius: 3px 3px 6px 6px; background: #283b3e; transform-origin: top; }
.legs i:first-child { left: 2px; }
.legs i:last-child { right: 2px; }
.torso { position: absolute; bottom: 38px; left: 16px; width: 33px; height: 40px; border: 3px solid #102d34; border-radius: 11px 11px 5px 5px; background: #b1583e; }
.head { position: absolute; top: 1px; left: 20px; width: 28px; height: 29px; border: 3px solid #102d34; border-radius: 45% 48% 45% 43%; background: #c99169; }
.hair { position: absolute; top: -4px; right: -3px; left: -3px; height: 13px; border-radius: 60% 60% 20% 20%; background: #1c3032; transform: rotate(-4deg); }
.face { position: absolute; top: 13px; right: 5px; width: 4px; height: 3px; border-radius: 50%; background: #3d3026; box-shadow: -9px 0 0 #3d3026; }
.arm { position: absolute; top: 7px; width: 8px; height: 33px; border: 3px solid #102d34; border-radius: 5px; background: #c99169; transform-origin: top; }
.arm-left { left: -7px; transform: rotate(11deg); }
.arm-right { right: -7px; transform: rotate(-12deg); }
.prop { position: absolute; display: none; }

.resident-yingzhen .torso { background: #d5c8aa; }
.resident-yingzhen .legs i { background: #273539; }
.resident-yingzhen .hair { top: -6px; left: 3px; width: 23px; height: 17px; border-radius: 50%; }
.resident-yingzhen .hair::after { position: absolute; top: 3px; left: -8px; width: 10px; height: 10px; border-radius: 50%; background: #1c3032; content: ""; }
.resident-yingzhen .prop { right: 1px; bottom: 33px; display: block; width: 8px; height: 17px; border: 2px solid #102d34; background: #3b7777; }

.resident-yining .torso { background: #416b68; }
.resident-yining .legs i { background: #b5a37e; }
.resident-yining .head { background: #b87e58; }
.resident-yining .prop { right: -2px; bottom: 30px; display: block; width: 27px; height: 19px; border: 3px solid #102d34; background: #c6c2af; transform: rotate(-5deg); }

.resident-yueqin .person { transform: scale(.93); }
.resident-yueqin .torso { bottom: 36px; width: 37px; height: 43px; background: #93584c; }
.resident-yueqin .legs i { height: 33px; background: #344746; }
.resident-yueqin .head { top: 0; width: 30px; height: 31px; background: #c38a66; }
.resident-yueqin .hair { height: 16px; background: #c6c4b7; box-shadow: 7px -3px 0 #c6c4b7, -5px -2px 0 #c6c4b7; }
.resident-yueqin .prop { right: -2px; bottom: 27px; display: block; width: 24px; height: 20px; border: 2px solid #102d34; background: var(--paper); transform: rotate(9deg); }

.resident-zhaoheng .head { background: #a96e4e; }
.resident-zhaoheng .torso { background: #315c5e; }
.resident-zhaoheng .prop { left: -8px; bottom: 25px; display: block; width: 11px; height: 55px; border: 3px solid #102d34; background: #9e563d; transform: rotate(-12deg); }

.speech {
  position: absolute;
  bottom: 112px;
  left: 50%;
  z-index: 12;
  display: none;
  min-width: 130px;
  max-width: 190px;
  padding: 9px 11px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: 5px 5px 0 rgb(7 28 33 / 20%);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  transform: translateX(-50%);
}

.speech::after { position: absolute; bottom: -9px; left: calc(50% - 7px); width: 13px; height: 13px; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); background: var(--paper); content: ""; transform: rotate(45deg); }
.speech.is-visible { display: block; animation: bubble-in .25s ease both; }

.resident-inspector {
  position: absolute;
  top: 86px;
  left: 20px;
  z-index: 66;
  width: min(315px, calc(100% - 40px));
  padding: 20px 22px 18px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgb(5 25 30 / 25%);
  animation: inspector-in .28s ease both;
}

.resident-inspector > button { position: absolute; top: 8px; right: 9px; width: 30px; height: 30px; color: var(--ink); border: 0; background: transparent; font-size: 23px; cursor: pointer; }
.resident-inspector small { color: #5b6b68; font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.resident-inspector h2 { margin: 7px 0 11px; font-family: var(--serif); font-size: 27px; }
.resident-inspector p { margin: 0; font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.55; }
.resident-inspector > span { display: block; margin-top: 13px; padding-top: 10px; color: #67716c; border-top: 1px solid rgb(17 40 44 / 20%); font-size: 9px; letter-spacing: .05em; }

.public-record {
  position: absolute;
  top: 23%;
  left: 50%;
  z-index: 64;
  display: grid;
  width: min(390px, calc(100% - 40px));
  padding: 16px 18px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--yellow);
  box-shadow: 8px 8px 0 rgb(6 27 32 / 26%);
  transform: translateX(-50%) rotate(-1deg);
  animation: record-reveal .45s ease both;
}

.public-record small { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.public-record strong { margin-top: 8px; font-family: var(--serif); font-size: 20px; }

.intervention {
  position: absolute;
  right: 24px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 65;
  display: grid;
  width: min(360px, calc(100% - 48px));
  padding: 13px;
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgb(5 25 30 / 25%);
  animation: intervention-in .34s ease both;
}

.intervention > small { margin: 0 4px 8px; color: #596864; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.intervention button { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 49px; padding: 0 14px; color: var(--paper); border: 2px solid var(--line); background: var(--coral); box-shadow: 3px 3px 0 var(--line); font-size: 13px; font-weight: 800; cursor: pointer; }
.intervention button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.intervention > span { margin-top: 9px; color: #596864; font-family: var(--mono); font-size: 8px; text-align: right; }

.scene-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: calc(72px + var(--safe-bottom));
  padding: 10px 22px calc(10px + var(--safe-bottom));
  border-top: 1px solid rgb(245 235 213 / 25%);
  background: rgb(12 32 38 / 94%);
  box-shadow: 0 -12px 26px rgb(0 0 0 / 16%);
  backdrop-filter: blur(12px);
}

.scene-caption > div:first-child { display: flex; align-items: center; min-width: 0; }
.caption-time { margin-right: 14px; padding: 6px 8px; color: var(--yellow); border: 1px solid rgb(245 235 213 / 24%); font-family: var(--mono); font-size: 9px; }
.scene-caption p { overflow: hidden; margin: 0; font-family: var(--serif); font-size: clamp(13px, 1.6vw, 18px); font-weight: 800; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.market-countdown { display: grid; justify-items: end; margin-left: 20px; padding-left: 20px; border-left: 1px solid rgb(245 235 213 / 22%); }
.market-countdown small { color: var(--paper-dim); font-size: 8px; letter-spacing: .12em; }
.market-countdown strong { margin-top: 3px; color: var(--coral); font-family: var(--mono); font-size: 16px; letter-spacing: .08em; }

.blackout {
  position: absolute;
  inset: 0;
  z-index: 63;
  background: #061316;
  opacity: 0;
  pointer-events: none;
  transition: opacity .65s ease;
}

.blackout.is-active { opacity: .96; }

@keyframes live-breathe { 0%, 100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes signal-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes window-flicker { 0%, 19%, 23%, 100% { background: #25454a; } 20%, 22%, 66%, 70% { background: #e7c875; } }
@keyframes rain-fall { from { transform: translateY(-110px) rotate(13deg); } to { transform: translateY(620px) rotate(13deg); } }
@keyframes person-walk { from { translate: 0 0; rotate: -1deg; } to { translate: 0 -3px; rotate: 1deg; } }
@keyframes leg-left { from { transform: rotate(9deg); } to { transform: rotate(-8deg); } }
@keyframes leg-right { from { transform: rotate(-8deg); } to { transform: rotate(9deg); } }
@keyframes noticed-ring { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes machine-shake { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.5deg); } }
@keyframes bubble-in { from { opacity: 0; transform: translate(-50%, 7px) scale(.95); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes inspector-in { from { opacity: 0; transform: translateX(-9px); } to { opacity: 1; transform: translateX(0); } }
@keyframes intervention-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes record-reveal { from { opacity: 0; transform: translate(-50%, -10px) rotate(-1deg); } to { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); } }

@media (max-width: 820px) {
  .world-header { grid-template-columns: 1fr auto; height: calc(60px + var(--safe-top)); padding: var(--safe-top) 12px 0; }
  .world-now { position: absolute; top: calc(48px + var(--safe-top)); left: 50%; z-index: 2; padding: 5px 9px; background: rgb(12 32 38 / 88%); transform: translateX(-50%); }
  .brand-mark { width: 34px; height: 34px; font-size: 20px; }
  .world-brand strong { font-size: 16px; }
  .world-brand small { font-size: 8px; }
  .tool-button { width: 44px; min-height: 44px; padding: 0; }
  .tool-button b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .world-menu summary { width: 44px; min-height: 44px; }
  .sandbox::before { top: calc(60px + var(--safe-top)); }
  .first-visit { top: calc(88px + var(--safe-top)); padding: 13px 16px; }
  .first-visit small { display: none; }
  .skyline { top: calc(60px + var(--safe-top)); }
  .neighborhood { inset: 20% -30% 31%; grid-template-columns: 31% 42% 27%; min-width: 130%; }
  .market-sign small { display: none; }
  .street-layer { width: 130%; transform: translateX(-15%); }
  .arcade-pillar { bottom: 29%; }
  .scooter-one { left: -3%; }
  .scooter-two { right: 2%; }
  .broadcast-machine { right: 2%; bottom: 25%; transform: scale(.78); transform-origin: bottom right; }
  .toolbox { left: 15%; bottom: 29%; transform: scale(.8); }
  .plan-table { right: 12%; bottom: 29%; transform: scale(.78); }
  .resident { width: 68px; height: 109px; }
  .person { right: 4px; bottom: 5px; left: 4px; transform: scale(.86); }
  .resident-yueqin .person { transform: scale(.81); }
  .resident[data-facing="left"] .person { transform: scaleX(-1) scale(.86); }
  .resident-yueqin[data-facing="left"] .person { transform: scaleX(-1) scale(.81); }
  .speech { bottom: 101px; min-width: 112px; max-width: 145px; padding: 7px 9px; font-size: 10px; }
  .name-tag { top: 4px; font-size: 10px; }
  .resident-inspector { top: 80px; left: 12px; width: min(286px, calc(100% - 24px)); padding: 17px 19px; }
  .resident-inspector h2 { font-size: 23px; }
  .resident-inspector p { font-size: 13px; }
  .public-record { top: 19%; }
  .resident-inspector > button { width: 44px; height: 44px; }
  .intervention { right: 12px; bottom: calc(83px + var(--safe-bottom)); width: calc(100% - 24px); }
  .scene-caption { min-height: calc(64px + var(--safe-bottom)); padding: 8px 12px calc(8px + var(--safe-bottom)); }
  .caption-time { display: none; }
  .scene-caption p { font-size: 13px; white-space: normal; line-height: 1.35; }
  .market-countdown { margin-left: 10px; padding-left: 10px; }
  .market-countdown small { display: none; }
  .market-countdown strong { font-size: 12px; }
}

@media (max-width: 520px) {
  .neighborhood { inset: 18% -58% 32%; width: 158%; }
  .street-layer { width: 150%; transform: translateX(-22%); }
  .window { min-height: 38px; }
  .vertical-sign { font-size: 9px; }
  .market-sign { top: 51%; right: 5%; left: 5%; padding: 7px 8px; font-size: 13px; }
  .broadcast-machine { right: -1%; }
  .resident { transition-duration: 1.75s; }
  .resident-zhaoheng { margin-left: -2%; }
  .resident-yueqin { margin-left: -1%; }
  .world-menu > div { right: -2px; min-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-village *,
  .live-village *::before,
  .live-village *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.simple-page {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background: var(--night);
  font-family: var(--sans);
}

.simple-page header,
.simple-page main {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
}

.simple-page header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid rgb(245 235 213 / 25%);
}

.simple-page header strong {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .1em;
}

.simple-page a {
  color: inherit;
}

.simple-page header a {
  color: var(--yellow);
  font-size: 13px;
  text-decoration: none;
}

.simple-page main {
  padding: 9vh 0 80px;
}

.simple-page .simple-kicker {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.simple-page h1 {
  max-width: 650px;
  margin: 18px 0 26px;
  font-family: var(--serif);
  font-size: clamp(40px, 8vw, 76px);
  line-height: 1.05;
}

.simple-page .simple-lead {
  max-width: 620px;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
}

.simple-page article,
.simple-page li {
  color: var(--ink);
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: 6px 6px 0 rgb(239 90 60 / 75%);
}

.simple-page article {
  margin-top: 42px;
  padding: 24px;
}

.simple-page article time,
.simple-page article small {
  color: #5c6964;
  font-family: var(--mono);
  font-size: 10px;
}

.simple-page article h2 {
  margin: 10px 0;
  font-family: var(--serif);
  font-size: 27px;
}

.simple-page article p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.simple-page ol {
  display: grid;
  gap: 14px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: simple-rule;
}

.simple-page li {
  position: relative;
  padding: 20px 22px 20px 64px;
  counter-increment: simple-rule;
}

.simple-page li::before {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--coral);
  font-family: var(--mono);
  font-weight: 900;
  content: "0" counter(simple-rule);
}

.simple-page li strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 18px;
}

.simple-page li span {
  color: #536460;
  font-size: 13px;
  line-height: 1.55;
}
