* {
  box-sizing: border-box;
}
:root {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #25382e;
  background: #f6f3ea;
  --line: #d2d0bf;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
}
body {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}
button:focus-visible,
canvas:focus-visible {
  outline: 3px solid #c27c34;
  outline-offset: -3px;
}
button:hover {
  color: #905734;
}
button[hidden],
[hidden] {
  display: none !important;
}
.mast {
  height: 76px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font: 700 23px var(--serif);
}
.bookmark {
  display: grid;
  place-items: center;
  background: #25483a;
  color: #f4efd8;
  font: 22px var(--serif);
  width: 32px;
  height: 38px;
  border-radius: 2px 2px 8px 2px;
}
.imprint,
.eyebrow,
.catalog-foot,
.meta,
.code {
  font-family: Georgia, serif;
  letter-spacing: 0.15em;
}
.imprint {
  font-size: 11px;
  color: #657264;
}
.mast button {
  margin-left: auto;
  font-size: 13px;
}
main {
  display: grid;
  grid-template-columns: minmax(224px, 18.5vw) minmax(0, 1fr);
  gap: 3vw;
  padding: 30px 3vw 25px 4vw;
  min-height: calc(100svh - 76px);
}
aside {
  padding: 19px 0 0;
}
.eyebrow {
  font-size: 10px;
  font-weight: bold;
  color: #6c705c;
  display: flex;
  gap: 9px;
  align-items: center;
}
.eyebrow i {
  height: 1px;
  width: 22px;
  background: #8c886a;
}
h1,
h2 {
  font-family: var(--serif);
  letter-spacing: 0.05em;
}
h1 {
  font-size: clamp(35px, 3.5vw, 56px);
  line-height: 1.15;
  margin: 18px 0 14px;
}
.intro {
  font-size: 13px;
  color: #626c60;
  line-height: 1.9;
  margin: 0 0 27px;
}
.shelf,
.row {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 13px;
  border-top: 1px solid var(--line);
  padding: 13px 3px;
}
.shelf:hover,
.row:hover {
  background: #eeeade;
}
.code {
  height: 30px;
  width: 27px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--ink);
  border: 1px solid currentColor;
  border-bottom-width: 3px;
  font-style: normal;
  font-size: 17px;
}
.shelf b,
.row b {
  display: block;
  font: 700 17px var(--serif);
}
.shelf small,
.row small {
  display: block;
  font-size: 11px;
  color: #697267;
  margin-top: 4px;
}
.shelf:after {
  content: "›";
  margin-left: auto;
  color: #808776;
}
.catalog-foot {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-size: 11px;
  color: #697267;
}
.catalog-foot span {
  margin: 0 5px;
}
.viewer {
  border: 1px solid var(--line);
  background: #eeeade;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 520px;
}
.toolbar,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 17px;
  gap: 8px;
  background: #f5f3e9;
}
.toolbar {
  border-bottom: 1px solid var(--line);
}
.floor {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 16px var(--serif);
}
.floor small {
  border: 1px solid #959e88;
  padding: 3px 4px;
  font: 12px Georgia;
}
nav {
  display: flex;
  background: #e7e7da;
  padding: 3px;
  border-radius: 4px;
}
nav button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 3px;
}
nav [aria-pressed="true"],
.go {
  background: #294b3c;
  color: #fff9e4;
}
.stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}
#world,
#world canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world canvas {
  touch-action: none;
  display: block;
  cursor: grab;
}
.zone-pin {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  background: var(--ink);
  color: white;
  width: 25px;
  height: 25px;
  border: 1px solid #f9f1d7;
  border-radius: 50% 50% 50% 0;
  font: 15px Georgia;
  box-shadow: 0 2px 5px #1c302c55;
}
.zone-pin:hover {
  color: white;
  outline: 2px solid white;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 12px;
}
footer p {
  margin: 0;
  color: #5b675c;
}
footer button {
  font-weight: 600;
}
#loading,
#hint,
#enter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  padding: 10px 14px;
  border-radius: 4px;
  background: #294538;
  color: #fff8df;
  font-size: 13px;
}
#loading {
  top: 38%;
}
#hint {
  top: 12px;
  opacity: 0;
  pointer-events: none;
}
#hint.show {
  opacity: 1;
}
#enter {
  bottom: 14px;
  white-space: nowrap;
}
#joystick {
  display: none;
  position: absolute;
  left: 16px;
  bottom: 16px;
  border: 1px solid #fffd;
  background: #283e3499;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  touch-action: none;
  place-items: center;
}
#joystick i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f7f3dccc;
}
@media (pointer: coarse) {
  [data-view="eye"] #joystick {
    display: grid;
  }
}
dialog {
  width: min(420px, 90vw);
  max-height: 88svh;
  padding: 30px;
  border: 1px solid #a2a28a;
  background: #faf7ee;
  color: #293b30;
  box-shadow: 0 22px 90px #12271e48;
}
dialog::backdrop {
  background: #1a261e69;
}
#close {
  position: absolute;
  right: 10px;
  top: 9px;
  font-size: 24px;
  width: 34px;
  height: 34px;
}
.meta {
  color: #767964;
  font-size: 10px;
}
h2 {
  font-size: 32px;
  margin: 15px 0;
}
.record {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.record small {
  color: #657064;
  font-size: 10px;
  letter-spacing: 0.12em;
}
dialog p {
  font-size: 14px;
  line-height: 1.9;
  color: #506054;
}
.go {
  padding: 10px 18px;
  margin-top: 4px;
}
.go:hover {
  color: white;
  background: #375e48;
}
@media (max-width: 760px) {
  .mast {
    height: 54px;
    padding: 0 15px;
    gap: 10px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .bookmark {
    width: 25px;
    height: 30px;
    font-size: 17px;
  }
  .imprint {
    display: none;
  }
  main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    min-height: calc(100svh - 54px);
  }
  aside {
    padding: 0;
  }
  .eyebrow,
  .intro,
  .catalog-foot {
    display: none;
  }
  h1 {
    font-size: 23px;
    margin: 0 0 8px;
  }
  #shelves {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
  }
  .shelf {
    width: auto;
    padding: 4px 7px;
    border: 1px solid var(--line);
    gap: 5px;
    border-radius: 3px;
  }
  .shelf b {
    font-size: 12px;
  }
  .shelf .code {
    width: 14px;
    height: 16px;
    font-size: 12px;
    border: 0;
  }
  .shelf small,
  .shelf:after {
    display: none;
  }
  .viewer {
    flex: 1;
    min-height: 365px;
  }
  .toolbar,
  footer {
    padding: 8px;
  }
  .floor {
    font-size: 13px;
    gap: 5px;
  }
  nav button {
    padding: 5px 8px;
  }
  .zone-pin {
    width: 21px;
    height: 21px;
    font-size: 12px;
  }
  footer {
    font-size: 11px;
  }
}
.codes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.codes button {
  width: calc((100% - 16px) / 3);
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
}
.codes img,
.large-code {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.large-code {
  max-width: 430px;
  margin: 0 auto;
}
.scan-note {
  display: block;
  font-size: 11px;
  color: #697267;
  margin: 6px 0 12px;
}
.weather {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #f8f5e9ed;
  box-shadow: 0 2px 10px #27372822;
  border: 1px solid #a6ad97;
  color: #354b3d;
  padding: 6px 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  border-radius: 3px;
}
.weather select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.weather output {
  font-weight: bold;
}
.codes span {
  display: block;
  padding: 3px 0;
}
.toolbar nav {
  flex-shrink: 0;
}
.works {
  margin: 12px 0 16px;
}
.works > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.works section {
  margin-right: auto;
}
.works small {
  display: block;
  font-size: 11px;
  color: #727769;
}
.works strong {
  font: 600 16px var(--serif);
}
.works a {
  color: #315b4b;
  font-size: 13px;
  text-underline-offset: 3px;
}
.works .play {
  background: #2a5140;
  color: #fff3da;
  text-decoration: none;
  padding: 6px 9px;
  border-radius: 3px;
}
.reader-avatar {
  width: 50px;
  height: 53px;
  object-fit: contain;
  background: #dfe5d5;
  border-radius: 12px;
  border: 1px solid #c1cebd;
}
.row:has(.reader-avatar) {
  padding: 8px 4px;
}
