/* Suchka game screens (client/app + client/scenes) */
#stage {
  position: absolute;
  inset: 0;
  transition: opacity .28s;
}
#stage.leaving {
  opacity: 0;
}
.game > .hud.top,
#app-stage .hud.top {
  z-index: 30;
}

/* ---- intro */
.intro {
  position: absolute;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  background: #000;
  transition: opacity .7s;
}
.intro.gone {
  opacity: 0;
  pointer-events: none;
}
.intro .bgi {
  position: absolute;
  inset: -4%;
  background: url(/world/office/office-exterior-1.png) center 30% / cover;
  animation: intro-push 30s ease-out forwards;
  filter: brightness(.8);
}
@keyframes intro-push {
  to {
    transform: scale(1.08) translateY(-1.5%);
  }
}
.intro .rain {
  position: absolute;
  inset: -20% 0 0;
  pointer-events: none;
  opacity: .35;
  background: repeating-linear-gradient(105deg, transparent 0 7px, #c8d4ff22 7px 8px, transparent 8px 19px);
  background-size: 100% 60px;
  animation: rain .45s linear infinite;
}
@keyframes rain {
  to {
    background-position: -14px 60px;
  }
}
.intro .vign {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 30%, #000b 100%), linear-gradient(transparent 55%, #000d);
}
.intro .title {
  position: absolute;
  left: 0;
  right: 0;
  top: 20%;
  text-align: center;
  color: #f0dfbf;
  transition: top .9s cubic-bezier(.4, 0, .2, 1);
}
.intro.open .title {
  top: 9%;
}
.intro .mark {
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 0 14px #b5322a99);
}
.intro h1 {
  margin: 6px 0 0;
  font: 600 44px "Cinzel", serif;
  letter-spacing: .32em;
  text-indent: .32em;
  text-shadow: 0 2px 18px #000, 0 0 30px #b5322a66;
}
.intro .title p {
  margin: 4px 0 0;
  font: 16px "LXGW WenKai Screen", serif;
  letter-spacing: .5em;
  text-indent: .5em;
  color: #d8c49a;
}
.intro .tapgo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  text-align: center;
  color: #f0dfbf;
  font: 15px "LXGW WenKai Screen", serif;
  letter-spacing: .4em;
  animation: ack-breathe 2.4s ease-in-out infinite;
}
.intro.open .tapgo {
  display: none;
}
.intro .menu {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 54%;
  translate: 0 -50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s .3s;
}
.intro.open .menu {
  opacity: 1;
  pointer-events: auto;
}
.intro .menu .ink-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 30px solid transparent;
  padding: 4px 8px 4px 40px;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / 100% 100% no-repeat;
  background-origin: border-box;
  filter: drop-shadow(0 12px 22px #000c);
}
.intro .menu .ink-opt {
  font-size: 18px;
  padding: 8px 4px;
}
.intro .acct {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  text-align: center;
  color: #b8a888;
  font: 12px "LXGW WenKai Screen", serif;
  opacity: 0;
  transition: opacity .6s .5s;
}
.intro.open .acct {
  opacity: 1;
}
.intro .acct b {
  color: #f0dfbf;
  font-weight: 400;
}

/* ---- account forms */
.sheet-modal .acct {
  margin: 0;
}
.sheet-modal .fld {
  display: block;
  margin: 8px 0 10px;
}
.sheet-modal .fld span {
  display: block;
  width: auto;
  font-size: 13px;
  color: #6a4a2a;
}
.sheet-modal .fld input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 2px solid #6a4a2a88;
  background: transparent;
  padding: 6px 2px;
  font: 18px "LXGW WenKai Screen", serif;
  color: #2a1a0c;
  outline: none;
}
.sheet-modal .fld input:focus {
  border-bottom-color: #8a2a1a;
}
.sheet-modal .fld small {
  display: block;
  font-size: 11px;
  color: #8a6a4a;
  margin-top: 2px;
}
.sheet-modal .err {
  min-height: 1.4em;
  margin: 4px 0;
  color: #8a1a0c;
  font-size: 13px;
  text-align: center;
}
.sheet-modal .alt {
  text-align: center;
  font-size: 13px;
  margin: 10px 0 0;
}
.sheet-modal .alt a {
  color: #6a1a0c;
}
.sheet-modal .code {
  margin: 10px auto 12px;
  text-align: center;
  white-space: nowrap;
  font: 700 clamp(15px, 5vw, 21px) "Courier Prime", Menlo, monospace;
  letter-spacing: .08em;
  color: #3a1608;
  padding: 10px;
  border: 1px dashed #6a4a2a88;
  user-select: all;
  -webkit-user-select: all;
}

/* ---- item card */
.itemcard {
  text-align: center;
}
.itemcard .pic {
  width: 58%;
  aspect-ratio: 1;
  margin: -6px auto -4px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 8px 10px #0008);
}
.itemcard .price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 4px;
  font: 700 17px Georgia, serif;
  color: #6a3a10;
}
.itemcard .price img {
  width: 20px;
  height: 20px;
}
.itemcard .own {
  font-size: 12px;
  color: #7a5a34;
}

/* ---- card scene (a letter) */
.scene-card {
  position: absolute;
  inset: 0;
  background: #07080f url(/world/office/office-night-2.png) center / cover;
}
.scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000b;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.scene-card .letter {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7%;
  bottom: 13%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border: 34px solid transparent;
  padding: 0 4px;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / 100% 100% no-repeat;
  background-origin: border-box;
  color: #2a2218;
  font: 15px/1.75 "LXGW WenKai Screen", "Songti SC", serif;
  filter: drop-shadow(0 20px 30px #000);
  transform: rotate(-1.2deg);
  animation: pp-in .5s cubic-bezier(.16, .84, .3, 1);
}
.scene-card .letter h3 {
  margin: 0 0 8px;
  font: 700 19px "LXGW WenKai Screen", "Songti SC", serif;
}
.scene-card .letter p {
  margin: 0 0 10px;
}
.scene-card .letter img {
  width: 46%;
  margin: 8px 2% 0 0;
  border: 6px solid #fff;
  box-shadow: 0 3px 8px #0006;
  transform: rotate(var(--r));
}
.scene-card .letter.seal::after {
  content: "";
  display: block;
  width: 84px;
  height: 110px;
  margin: 6px 0 0 auto;
  background: url(/world/ui/medieval/icons/wax-seal-ribbon.png) center / contain no-repeat;
  transform: rotate(-8deg);
}
.scene-card .ack-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  text-align: center;
  color: #e9dcc0;
}

/* ---- search scene */
.scene-search {
  position: absolute;
  inset: 0;
  background: #000;
}
.scene-search .view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.scene-search .pano {
  position: absolute;
  top: 0;
  height: 100%;
  will-change: transform;
  transform-origin: 0 0;
}
.scene-search .pano > .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.scene-search .edge {
  position: absolute;
  top: 45%;
  z-index: 8;
}
.scene-search .edge.cl {
  left: 6px;
}
.scene-search .edge.cr {
  right: 6px;
}
.scene-search .zoombox {
  position: absolute;
  right: 6px;
  top: 58%;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scene-search .zoombox .zi {
  background-image: url(/world/ui/medieval/icons/knob-plus.png) !important;
}
.scene-search .zoombox .zo {
  background-image: url(/world/ui/medieval/icons/knob-minus.png) !important;
}
.scene-search .zoombox button,
.scene-search .edge {
  color: transparent !important;
  font-size: 0 !important;
}
.scene-search .edge.cl {
  background-image: url(/world/ui/medieval/icons/knob-left.png) !important;
}
.scene-search .edge.cr {
  background-image: url(/world/ui/medieval/icons/knob-right.png) !important;
}
.scene-search .mini {
  position: absolute;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  width: 110px;
  height: 5px;
  border-radius: 3px;
  background: #ffffff22;
  z-index: 8;
  pointer-events: none;
}
.scene-search .mini i {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--acc);
}
.scene-search > .prompt {
  bottom: 12%;
}
.scene-search .closeup {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #000;
}
.scene-search .closeup .pic {
  position: absolute;
  inset: 0;
  background: #000 center / cover;
}
.scene-search .closeup .pic.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  animation: flash .5s forwards;
}
@keyframes flash {
  to {
    opacity: 0;
  }
}
.scene-search .closeup .pic.back {
  background: #e9dfc8 repeating-linear-gradient(0deg, transparent 0 27px, #8a6a4422 27px 28px);
  display: grid;
  place-items: center;
}
.scene-search .closeup .hand {
  font: 22px/1.7 "LXGW WenKai Screen", "Kaiti SC", serif;
  color: #2a3a6a;
  transform: rotate(-3deg);
  padding: 24px;
  text-align: center;
  white-space: pre-line;
}
.scene-search .closeup .pic.screen {
  display: grid;
  place-items: center;
  background: #0a0f1a;
  padding: 10%;
  color: #cfe3ff;
}
.scene-search .closeup .pic.paper {
  display: grid;
  place-items: center;
  background: #0b0806;
  container-type: size;
}
.scene-search .closeup .pic.paper .pg {
  position: relative;
  width: min(98cqw, 94cqh * .75);
  aspect-ratio: 3 / 4;
  background: center / 100% 100% no-repeat;
}
.scene-search .closeup .pic.paper.notebook .pg {
  background-image: url(/world/ui/medieval/notebook-page-1.png);
}
.scene-search .closeup .pic.paper.tag .pg {
  background-image: url(/world/ui/medieval/hang-tag-1.png);
}
.scene-search .closeup .pic.paper .mail {
  position: absolute;
  inset: 15% 21% 16% 26%;
  overflow: auto;
  color: #23283a;
  transform: rotate(-.6deg);
  font: 15px/1.75 "LXGW WenKai Screen", serif;
}
.scene-search .closeup .pic.paper.tag .mail {
  inset: 27% 25% 9% 27%;
  color: #2a1a0c;
  font-size: 14px;
}
.scene-search .closeup .mail small {
  color: #5a5446;
  font-size: 12px;
}
.scene-search .closeup .mail p {
  margin: 6px 0;
}
.scene-search .closeup .txt {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 38.2%;
  translate: 0 -50%;
  z-index: 6;
  max-height: 56%;
  overflow: auto;
  color: #2a1a0c;
  font: 15px/1.6 "LXGW WenKai Screen", serif;
  border: 30px solid transparent;
  padding: 4px 16px;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / 100% 100% no-repeat;
  background-origin: border-box;
  filter: drop-shadow(0 10px 18px #000c);
  cursor: pointer;
  transition: transform .5s cubic-bezier(.16, .84, .3, 1), opacity .35s;
  transform-origin: 100% 0;
  animation: pp-in .45s cubic-bezier(.16, .84, .3, 1);
}
.scene-search .closeup .txt.tuck {
  transform: translate(40%, -40%) scale(.08);
  opacity: .0;
  transition: transform .45s cubic-bezier(.55, 0, .85, .3), opacity .45s;
}
.scene-search .closeup .back-btn {
  top: 12px;
}
.scene-search .closeup .prompt {
  bottom: 8%;
}
.sheetview {
  position: absolute;
  inset: 0;
  z-index: 70;
  background: #050403;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.sheetview img {
  max-width: 94%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px #000);
}
.sheetview .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  text-align: center;
  color: #e9d9b8;
  font: 15px "LXGW WenKai Screen", serif;
}
.sheetview .cap small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: .6;
}
.halo {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s;
}
/* a small ring (max 20 px) inside a wide soft glow (about 3x its radius) that breathes: the glow swells and fades more than the ring */
.halo::before {
  content: "";
  position: absolute;
  inset: -150%;
  border-radius: 50%; /* clear inside, a thin bright edge at the ring, a long warm falloff */
  background: radial-gradient(closest-side, #ffe8b830 0%, #ffe2a838 17%, #ffe2a866 23%, #ffd28acc 25%, #ffc87a88 30%, #ffb85a55 42%,
    #ffb85a2c 60%, #ffb85a12 80%, #ffb85a00 100%);
  animation: glow-breathe 2.6s ease-in-out infinite;
}
.halo.on {
  opacity: 1;
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(.96);
  }
  50% {
    transform: scale(1.04);
  }
}
@keyframes glow-breathe {
  0%,
  100% {
    transform: scale(.93);
    opacity: .75;
    filter: brightness(.95);
  }
  50% {
    transform: scale(1.07);
    opacity: 1;
    filter: brightness(1.15);
  }
}
.halo.hinted:not(.on) {
  animation: hint 3.2s ease-in-out infinite;
}
@keyframes hint {
  0%,
  60%,
  100% {
    opacity: 0;
    transform: scale(.93);
  }
  80% {
    opacity: .75;
    transform: scale(1.05);
  }
}
.lbl {
  position: absolute;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  padding: 4px 9px;
  border-radius: 12px;
  background: #000b;
  color: var(--acc);
  opacity: 0;
  transition: opacity .2s;
  z-index: 5;
}
.lbl.on {
  opacity: 1;
}
.lbl.done::after {
  content: " ✓";
  color: var(--ok);
}
.fg {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 4;
}
.fg img {
  width: 100%;
  height: 100%;
  display: block;
}
.fg.sway img {
  transform-origin: 50% 0;
  animation: sway 7s ease-in-out infinite;
}
@keyframes sway {
  50% {
    transform: skewX(-0.8deg) translateX(0.6%);
  }
}

/* ---- ledger (was jobs.html) */
.scene-ledger {
  position: absolute;
  inset: 0;
  background: #07080f;
}
.scene-ledger .bgl {
  position: absolute;
  inset: -3%;
  background: url(/world/office/office-night-2.png) center / cover;
  filter: brightness(.4) blur(3px);
}
.book {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  transform: translateY(-50%);
  aspect-ratio: .96;
  overflow: visible;
  mix-blend-mode: lighten;
} /* the clip's black ground drops out (blend at the top: transforms below would isolate it) */
.scene-ledger .prompt {
  bottom: 16%;
} /* above the shop / sleep buttons */
/* = the camera box (139% wide, 4:3) */
.book .cam {
  position: absolute;
  top: 50%;
  width: 139%;
  aspect-ratio: 4 / 3;
  transform: translateY(-50%);
  left: -41.7%;
  transition: left 2.4s cubic-bezier(.45, 0, .25, 1) .5s, width 2.4s cubic-bezier(.45, 0, .25, 1) .5s;
  cursor: pointer;
}
.book.closed .cam {
  width: 120%;
  left: -29.2%;
} /* the closed book (frame x .42-.90) centred */
.book.opening .cam,
.book.open .cam {
  left: -8.3%;
  width: 139%;
  cursor: default;
} /* the page block (x .06-.78) fills the width */
.book video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.book .pg {
  position: absolute;
  top: 12%;
  bottom: 12%;
  opacity: 0;
  transition: opacity .7s ease-out;
  color: #2a1a0c;
  font-family: "LXGW WenKai Screen", "Noto Serif SC", serif;
  overflow: hidden;
}
.book.open .pg {
  opacity: 1;
}
.book .pgL {
  left: 9%;
  width: 30%;
}
.book .pgR {
  left: 45%;
  width: 28.5%;
}
.book h2 {
  margin: 0 0 2px;
  font: 400 20px/1.3 "ZCOOL XiaoWei", serif;
  color: #3a1608;
  text-align: center;
}
.book .sub {
  font-size: 10.5px;
  color: #6a5a44;
  text-align: center;
  margin-bottom: 6px;
}
.book .list {
  padding-left: 22px;
}
.book .list .ink-opt {
  font-size: 13px;
  line-height: 1.35;
  padding: 6px 2px;
}
.book .list .ink-opt .drop {
  left: -22px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
}
.book .list .ink-opt .smear {
  left: -24px;
  height: 24px;
  margin-top: -11px;
}
.book .list .ink-opt.done {
  opacity: .5;
}
.book .list .ink-opt.done::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background: url(/world/ui/medieval/icons/done.png) center / contain no-repeat;
  transform: rotate(-10deg);
}
.book .det {
  font-size: 11.5px;
  line-height: 1.55;
}
.book .det h3 {
  margin: 0 0 2px;
  font: 400 15px/1.3 "ZCOOL XiaoWei", serif;
  color: #3a1608;
}
.book .det .who {
  font-size: 10.5px;
  color: #7a6a54;
}
.book .det p {
  margin: 6px 0;
}
.book .det .meta {
  font-size: 10.5px;
  color: #5a4a34;
}
.book .det .meta b {
  color: #8a2a1a;
  font-weight: 400;
}
.book .det .hintline {
  margin-top: 8px;
  font-size: 10.5px;
  color: #7a5a34;
  opacity: .8;
}
/* reading on a phone: once open, the view pushes in again until ONE page fills the width (p0 = the list, p1 = the job);
   ← → / A D, a swipe or the edge knobs turn between them. The words grow with it */
.book.open {
  top: 50%;
}
.scene-ledger .hud.top {
  z-index: 30;
}
.book.open .cam {
  width: 278%;
  transition: left .55s cubic-bezier(.4, 0, .2, 1), width 1.2s cubic-bezier(.45, 0, .25, 1);
}
.book.open.p0 .cam {
  left: -16.7%;
}
.book.open.p1 .cam {
  left: -116.7%;
}
.book.open .pg {
  top: 17%;
  bottom: 14%;
}
.book.open.p0 .pgR,
.book.open.p1 .pgL {
  visibility: hidden;
  transition: opacity .7s ease-out, visibility 0s .55s;
} /* the other page leaves the keyboard once off screen */
.book.open h2 {
  font-size: 30px;
}
.book.open .sub {
  font-size: 14px;
  margin-bottom: 14px;
}
.book.open .list {
  padding-left: 34px;
}
.book.open .list .ink-opt {
  font-size: 20px;
  line-height: 1.4;
  padding: 10px 2px;
}
.book.open .list .ink-opt .drop {
  left: -30px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
}
.book.open .list .ink-opt .smear {
  left: -32px;
  height: 30px;
  margin-top: -14px;
}
.book.open .det {
  font-size: 16.5px;
  line-height: 1.7;
}
.book.open .det h3 {
  font-size: 24px;
}
.book.open .det .who,
.book.open .det .meta {
  font-size: 13.5px;
}
.book .det .take {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin-top: 14px;
}
.pgknob {
  position: absolute;
  top: 50%;
  z-index: 20;
  display: none;
}
.book.open ~ .pgknob {
  display: block;
}
.pgPrev {
  left: 8px;
}
.pgNext {
  right: 8px;
}
.book.open.p0 ~ .pgPrev,
.book.open.p1 ~ .pgNext {
  opacity: .25;
  pointer-events: none;
}
.scene-ledger .nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.5%;
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 25;
}
.scene-ledger .pgknob {
  position: absolute;
  top: 50%;
  z-index: 20;
}
.scene-ledger .pgPrev {
  left: 8px;
}
.scene-ledger .pgNext {
  right: 8px;
}
.scene-ledger .pgPrev {
  background-image: url(/world/ui/medieval/icons/knob-left.png) !important;
}
.scene-ledger .pgNext {
  background-image: url(/world/ui/medieval/icons/knob-right.png) !important;
}
.scene-ledger .pgknob {
  color: transparent !important;
  font-size: 0 !important;
  display: none;
}
.scene-ledger .book.open ~ .pgknob {
  display: block;
}

/* ---- city map (was the office map) */
.scene-map {
  position: absolute;
  inset: 0;
  background: #0b0c14;
}
.scene-map .mapw {
  position: absolute;
  inset: 0;
  background: #0b0c14;
  z-index: 30;
  overflow: hidden;
}
/* two levels: the whole city with its districts outlined in ink; a district zooms in (the map layer scales, the pins keep their size) */
.scene-map .mapw .mv {
  position: absolute;
  inset: 0;
  background: url(/world/map/city-map-2.png) center / cover;
  transform-origin: 0 0;
  transition: transform .8s cubic-bezier(.45, 0, .25, 1);
  --k: 1;
}
.scene-map .mapw .dist {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity .4s;
}
.scene-map .mapw .dist rect {
  fill: #b5322a0a;
  stroke: #7a1c10;
  stroke-width: 2.5;
  stroke-dasharray: 8 5;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .25s;
}
.scene-map .mapw .dist rect:hover,
.scene-map .mapw .dist rect.on {
  fill: #ffd28a22;
}
.scene-map .mapw .dname {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: pointer;
  text-align: center;
  transition: opacity .4s;
}
.scene-map .mapw .dname b {
  display: block;
  font: 400 17px "ZCOOL XiaoWei", "Noto Serif SC", serif;
  color: #2a1a0c;
  padding: 4px 14px;
  letter-spacing: .12em;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / cover;
  box-shadow: 0 3px 8px #000b;
}
.scene-map .mapw .dname small {
  display: inline-block;
  margin-top: 3px;
  font: 11px "LXGW WenKai Screen", serif;
  color: #f0dfbf;
  text-shadow: 0 1px 2px #000;
}
.scene-map .mapw .dname:hover b {
  box-shadow: 0 3px 8px #000b, 0 0 14px #ffc87aaa;
}
.scene-map .mapw.in .dist,
.scene-map .mapw.in .dname {
  opacity: 0;
  pointer-events: none;
}
.scene-map .mapw .pin {
  transform: translate(-50%, -100%) scale(calc(1 / var(--k)));
  transform-origin: 50% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s .5s;
}
.scene-map .mapw .pin.show {
  opacity: 1;
  pointer-events: auto;
}
/* a place on the map: the object (icon) with its name written on a small paper label under it, and a brass needle from the
   label down to the exact spot, stuck in with a red pin head; the element's bottom is that spot */
.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pin img {
  display: block;
  width: 66px;
  height: 66px;
  transform: rotate(var(--r, 0deg));
  filter: drop-shadow(2px 5px 3px #000b) drop-shadow(0 0 1px #000);
  transition: transform .2s, filter .2s;
}
.pin span {
  margin-top: -4px;
  position: relative;
  z-index: 1;
  font: 12px/1.2 "LXGW WenKai Screen", "Noto Serif SC", serif;
  padding: 2px 8px;
  color: #2a1a0c;
  white-space: nowrap;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / cover;
  border-radius: 2px;
  box-shadow: 0 2px 4px #000a;
}
.pin b {
  width: 2px;
  height: 22px;
  background: linear-gradient(90deg, #6a5228, #e8cf8a 50%, #6a5228);
  box-shadow: 1px 1px 1px #0008;
} /* the needle */
.pin i {
  width: 9px;
  height: 9px;
  margin-top: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a7a, #b0201a 60%, #5a0a08);
  box-shadow: 1px 2px 2px #000a;
} /* the pin head on the spot */
.pin:hover img {
  transform: rotate(var(--r, 0deg)) scale(1.12) translateY(-3px);
  filter: drop-shadow(4px 10px 5px #000b) drop-shadow(0 0 10px #ffc87a99);
}
.pin:hover span {
  box-shadow: 0 2px 4px #000a, 0 0 10px #ffc87a99;
}
.pin.done img {
  filter: drop-shadow(0 3px 4px #000c) sepia(.6) brightness(.8);
}
.pin.done span {
  opacity: .7;
}
.pin.done i {
  background: radial-gradient(circle at 35% 35%, #9ad0a0, #3a7a4a 60%, #14301c);
}
.scene-map .mapPick {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000a;
}
.scene-map .mapPick[hidden] {
  display: none;
}
.scene-map .mapPick .choices {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* travel */
#travel {
  position: absolute;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  background: #000;
}
/* the ride: a Grok clip from the car still (wipers, passing lamps), played once; tap to skip */
#car {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: bump 1.9s linear infinite;
}
/* the road under the wheels: small irregular bumps up and down, now and then a bigger jolt */
@keyframes bump {
  0%,
  100% {
    transform: scale(1.05) translateY(0);
  }
  9% {
    transform: scale(1.05) translateY(-2px);
  }
  14% {
    transform: scale(1.05) translateY(1px);
  }
  31% {
    transform: scale(1.05) translateY(-1px) rotate(.1deg);
  }
  47% {
    transform: scale(1.05) translateY(0);
  }
  55% {
    transform: scale(1.05) translateY(-5px) rotate(-.25deg);
  }
  60% {
    transform: scale(1.05) translateY(3px) rotate(.15deg);
  }
  66% {
    transform: scale(1.05) translateY(-1px);
  }
  82% {
    transform: scale(1.05) translateY(1px);
  }
}
#arrive {
  position: absolute;
  inset: 0;
  z-index: 46;
  background: #000 center / cover;
  animation: push 3s ease-out forwards;
}
@keyframes push {
  from {
    transform: scale(1.12);
    filter: brightness(.3);
  }
  30% {
    filter: brightness(1);
  }
  to {
    transform: scale(1);
  }
}
#card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16%;
  z-index: 47;
  text-align: center;
  animation: cardin 3s ease-out forwards;
}
#card b {
  display: block;
  font-size: 24px;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px #000;
}
#card span {
  color: var(--acc);
  font-size: 13px;
  letter-spacing: 3px;
}
@keyframes cardin {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  25%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}
.scene-map .travel {
  position: absolute;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  background: #000;
}
.scene-map .travel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: bump 1.9s linear infinite;
}
@keyframes bump {
  0%,
  100% {
    transform: scale(1.05) translateY(0);
  }
  9% {
    transform: scale(1.05) translateY(-2px);
  }
  55% {
    transform: scale(1.05) translateY(-5px) rotate(-.25deg);
  }
  60% {
    transform: scale(1.05) translateY(3px) rotate(.15deg);
  }
}
.scene-map .arrive {
  position: absolute;
  inset: 0;
  z-index: 46;
  background: #000 center / cover;
  animation: push 3s ease-out forwards;
}
@keyframes push {
  from {
    transform: scale(1.12);
    filter: brightness(.3);
  }
  30% {
    filter: brightness(1);
  }
  to {
    transform: scale(1);
  }
}
.scene-map .card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16%;
  z-index: 47;
  text-align: center;
  animation: cardin 3s ease-out forwards;
}
.scene-map .card b {
  display: block;
  font: 400 26px "ZCOOL XiaoWei", serif;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px #000;
  color: #f3e2c0;
}
.scene-map .card span {
  color: var(--acc);
  font-size: 13px;
  letter-spacing: 3px;
}
@keyframes cardin {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  25%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}

/* toasts sit high, clear of the prompt and the choices at the bottom */
.game > .toast {
  bottom: auto;
  top: 96px;
  left: 16px;
  right: 16px;
}
.scene-search .zoombox button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: center / contain no-repeat;
  filter: drop-shadow(0 3px 4px #000b);
  cursor: pointer;
}
.scene-search .zoombox button:active {
  transform: scale(.94);
}

.proto-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.proto-root > #wrap {
  height: 100%;
}

/* ---- search extensions: doors, timer, hall shadow, keypad, door crack, hiding */
.scene-search .links {
  position: absolute;
  right: 10px;
  bottom: 22%;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.scene-search .links button {
  font: 13px "LXGW WenKai Screen", serif;
  padding: 5px 12px;
  border: 1px solid #d8b56a55;
  border-radius: 4px;
  background: #0d0906cc;
  color: #f0dfbf;
  cursor: pointer;
}
.scene-search .links button::before {
  content: "🚪 ";
}
.scene-search .tbar {
  position: absolute;
  left: 12px;
  top: 40px;
  z-index: 8;
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.scene-search .tbar .clock {
  font: 700 15px Georgia, serif;
  color: var(--acc);
  text-shadow: 0 1px 3px #000;
}
.scene-search .tbar .sus {
  display: flex;
  gap: 4px;
}
.scene-search .tbar .sus i {
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: #ffffff22;
}
.scene-search .tbar .sus i.on {
  background: var(--red);
}
.scene-search .hallshadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  z-index: 5;
}
.scene-search .hallshadow i {
  position: absolute;
  top: 0;
  height: 100%;
  width: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #000 30%, transparent 72%);
}
.scene-search .hallshadow.pass i {
  animation: walk 4s linear forwards;
}
@keyframes walk {
  from {
    left: -25%;
  }
  to {
    left: 105%;
  }
}
.scene-search .hallshadow.stop i {
  left: 38%;
  transition: left 1.8s ease-out;
}
.scene-search .closeup .pic.back.dark {
  background: radial-gradient(#2a2016, #0b0806);
}
.scene-search .closeup .pic.back.dark .hand {
  color: #e9d9b8;
}
.keypad-view {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #000d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.keypad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px;
  border-radius: 14px;
  background: radial-gradient(#1a2a44, #05070c);
  box-shadow: 0 0 30px #000;
}
.keypad .kp-prompt {
  color: #9fb4d8;
  font-size: 13px;
  max-width: 250px;
  text-align: center;
}
.keypad small {
  color: #7a8aa8;
}
.keypad .code {
  font: 700 28px ui-monospace, monospace;
  letter-spacing: 10px;
  color: #cfe3ff;
  min-height: 36px;
}
.keypad .keys {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  gap: 8px;
}
.keypad .keys button {
  height: 46px;
  border-radius: 10px;
  border: 1px solid #7ab8ff44;
  background: #0e1626;
  color: #cfe3ff;
  font-size: 18px;
  cursor: pointer;
}
.keypad.brass {
  background: radial-gradient(#4a3420, #140c06);
}
.keypad.brass .code {
  color: #f0d49a;
}
.keypad.brass .keys button {
  background: #2a1c10;
  color: #f0d49a;
  border-color: #c8a06a55;
}
.keypad.bad {
  animation: shake .35s;
}
@keyframes shake {
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}
.keypad-view .ink-row {
  border: 26px solid transparent;
  padding: 0 10px 0 40px;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / 100% 100% no-repeat;
  background-origin: border-box;
}
.crack-view {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #000;
}
.crack-view .pic.crack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #120c08, #1c130d 45%, #0d0906);
  touch-action: none;
  cursor: ew-resize;
}
.crack-view .pic.crack .scene {
  position: absolute;
  top: 0;
  height: 100%;
  background: center / 100% 100% no-repeat;
  transition: transform .5s ease-out, filter .9s ease-out;
  filter: blur(1.2px) brightness(.8);
}
.crack-view .pic.crack.lean .scene {
  filter: none;
}
.crack-view .pic.crack.far .scene {
  filter: blur(10px) brightness(.32) saturate(.7) !important;
}
.crack-view .pic.crack .leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  background: #0d0906 no-repeat;
  background-size: auto 100%;
}
.crack-view .pic.crack .leaf.l {
  left: 0;
  background-image: url(/world/club/studio/door-crack-left.png);
  background-position: right center;
  box-shadow: inset -2px 0 6px #000;
}
.crack-view .pic.crack .leaf.r {
  right: 0;
  background-image: url(/world/club/studio/door-crack-right.png);
  background-position: left center;
  box-shadow: inset 2px 0 6px #000;
}
.crack-view .pic.crack.slam {
  animation: slam .35s ease-out;
}
@keyframes slam {
  20% {
    transform: translateX(-4px);
  }
  45% {
    transform: translateX(3px);
  }
  70% {
    transform: translateX(-1px);
  }
}
.crack-view .pic.crack.push {
  animation: pushin .9s ease-out;
}
@keyframes pushin {
  from {
    transform: scale(1.18);
  }
  to {
    transform: none;
  }
}
.crack-view .txt {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 20%;
  z-index: 6;
  color: #2a1a0c;
  font: 15px/1.6 "LXGW WenKai Screen", serif;
  border: 26px solid transparent;
  padding: 2px 12px;
  background: url(/world/ui/medieval/9s/panel-parchment-full.png) center / 100% 100% no-repeat;
  background-origin: border-box;
  filter: drop-shadow(0 10px 18px #000c);
}
.crack-view .txt .more {
  display: block;
  margin-top: 4px;
  color: #7a2a12;
}
.crack-view.looking .txt {
  top: auto;
  bottom: 22%;
}
.crack-view .risk {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: calc(3.5% + 64px);
  z-index: 6;
  height: 6px;
  border-radius: 3px;
  background: #ffffff14;
  overflow: hidden;
}
.crack-view .risk i {
  display: block;
  height: 100%;
  width: 0;
  background: #f7768e;
}
.crack-view .lookrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.5%;
  z-index: 7;
  display: none;
  gap: 10px;
  justify-content: center;
}
.crack-view.looking .lookrow {
  display: flex;
}
.crack-view .lookrow .lean {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crack-view .back-btn {
  top: 12px;
}
.hideview {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 9%;
  gap: 10px;
}
.hideview.hidden {
  display: none;
}
.hideview .peek {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: ew-resize;
  display: none;
}
.hideview.viewing .peek {
  display: block;
}
.hideview .peek .back,
.hideview .front {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  aspect-ratio: 16 / 9;
  transform: translateX(-50%);
}
.hideview .peek .back {
  background: center / cover;
  opacity: 0;
  transition: opacity .7s;
}
.hideview .peek .back.on {
  opacity: 1;
}
.hideview .front {
  width: auto;
  pointer-events: none;
}
.hideview.viewing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, #000c 100%);
}
.hideview > p,
.hideview > button,
.hideview > .air {
  position: relative;
  z-index: 2;
}
.hideview .hidetxt {
  max-width: 330px;
  text-align: center;
  color: var(--ink);
  min-height: 3em;
  margin: 0;
  font: 17px/1.5 "LXGW WenKai Screen", serif;
  background: #000b;
  border-radius: 10px;
  padding: 8px 12px;
}
.hideview .hidetxt .who {
  display: block;
  font-size: 14px;
  color: var(--acc);
}
.hideview .breath {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid #ffffff33;
  background: #0008;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  touch-action: none;
}
.hideview .breath.holding {
  background: #7ab8ff22;
  border-color: var(--blue);
}
.hideview .breath.hidden,
.hideview .air.hidden {
  display: none;
}
.hideview .air {
  width: 96px;
  height: 6px;
  border-radius: 3px;
  background: #ffffff1a;
  overflow: hidden;
}
.hideview .air i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--blue);
}

/* ---- minigame result cards (client/scenes/games/kit.ts finish): the rank as an ink stamp, the pay, the ways on */
.result-card .score {
  margin: 4px 0 8px;
  text-align: center;
  color: #4a3420;
  letter-spacing: .12em;
}
.result-card .score b {
  display: inline-block;
  margin: 0 .2em;
  font: 40px/1 "ZCOOL XiaoWei", "Noto Serif SC", serif;
  color: #8a1a0a;
  transform: rotate(-8deg);
  text-shadow: 0 0 1px #8a1a0a88;
}
.result-card .rank-seal {
  width: 64px;
  height: 64px;
  margin: 2px auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 36px/1 "ZCOOL XiaoWei", serif;
  color: #f3d9b0;
  background: radial-gradient(circle at 38% 34%, #b8321e, #7a1608 62%, #4a0c04);
  box-shadow: 0 3px 6px #0007, inset 0 0 0 4px #9a2412, inset 0 0 0 6px #5a0e06;
  transform: rotate(-10deg);
}
.result-card .pay {
  text-align: center;
  font-weight: 700;
  color: #3a1608;
  letter-spacing: .06em;
}
