* {
  box-sizing: border-box;
}
html,
body,
#app,
#world,
#title,
#hud,
#overlay {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #151e1e;
  color: #f5eddb;
  font:
    16px "Microsoft YaHei UI",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #f8d594;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.45;
}
i {
  display: block;
}
#world,
#title,
#hud,
#overlay {
  position: absolute;
  inset: 0;
}
#world {
  display: block;
}
#title {
  background: #202e30 url(title.webp) center center/cover no-repeat;
}
#title:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0b151bcc, #0e191a3b 49%, transparent 73%),
    linear-gradient(
      0deg,
      #0e171be0,
      transparent 16%,
      transparent 89%,
      #10191c77
    );
}
.mast,
.titlefoot {
  position: absolute;
  left: 5.2%;
  right: 5.2%;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #e3d8bd;
}
.mast {
  top: 5%;
  font:
    600 14px SimSun,
    serif;
  letter-spacing: 0.08em;
}
.crest {
  border: 1px solid #ccb889;
  outline: 1px solid #ccb889;
  outline-offset: 3px;
  height: 25px;
  width: 23px;
  display: grid;
  place-items: center;
  font-family: KaiTi;
  font-size: 21px;
  transform: rotate(-3deg);
}
.mast i {
  height: 1px;
  width: 54px;
  background: #e1c59780;
}
.small {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.13em;
  background: #0b171d65;
  border: 1px solid #cabd9d66;
  padding: 8px 12px;
}
.titlecopy {
  position: absolute;
  left: 8.1%;
  top: 49%;
  transform: translateY(-44%);
}
.eyeline {
  font:
    14px SimSun,
    serif;
  color: #dcc399;
  display: flex;
  align-items: center;
  gap: 13px;
}
.eyeline i {
  width: 41px;
  height: 1px;
  background: #b19467;
}
h1 {
  font:
    normal clamp(76px, 8.4vw, 145px)/1.15 STKaiti,
    KaiTi,
    "FangSong",
    SimSun,
    serif;
  margin: 15px 0 6px;
  letter-spacing: 0.07em;
  color: #f7f0dc;
  text-shadow: 0 6px 26px #10171566;
}
.roman {
  font:
    12px Georgia,
    serif;
  letter-spacing: 0.42em;
  color: #dbcfb0;
  margin: 0 0 28px 5px;
}
.verse {
  font:
    clamp(15px, 1.35vw, 22px) / 1.8 FangSong,
    SimSun,
    serif;
  letter-spacing: 0.08em;
  color: #e0d9c8;
}
.startlist {
  margin-top: 38px;
  width: 226px;
  display: grid;
  gap: 9px;
}
.startlist > button {
  font:
    19px KaiTi,
    SimSun,
    serif;
  letter-spacing: 0.16em;
  text-align: left;
  border: 1px solid #dcc18e80;
  padding: 13px 21px;
  background: #1b2525bd;
}
.startlist > button.primary {
  background: linear-gradient(105deg, #e6d3ac, #c8ae80);
  color: #302c24;
  border-color: #dbc299;
  box-shadow: inset 0 0 0 3px #c4ab80;
}
.startlist b {
  float: right;
  font: 20px Georgia;
  transition: transform 0.2s;
}
.startlist button:hover b {
  transform: translateX(4px);
}
.minor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.minor button {
  font-size: 13px;
  letter-spacing: 0.13em;
  color: #e2d9c2;
}
.minor i {
  width: 1px;
  height: 12px;
  background: #dad0b882;
}
.titlefoot {
  bottom: 4%;
  border-top: 1px solid #d7c19e55;
  padding-top: 13px;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.17em;
}
.bars,
.objective,
.place,
.boss,
#msg,
#prompt,
#slots,
#nav,
#target,
#labels {
  position: absolute;
}
#hud {
  pointer-events: none;
  text-shadow: 0 1px 7px #09120f;
}
#hud button {
  pointer-events: auto;
}
.bars {
  left: 3%;
  top: 4%;
  display: flex;
  align-items: center;
  gap: 13px;
}
.seal {
  background: #633a2be8;
  box-shadow:
    0 0 0 2px #372f27,
    inset 0 0 0 1px #bda16f;
  border: 3px solid #49382b;
  font:
    27px KaiTi,
    SimSun,
    serif;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #e6dab6;
}
.name {
  font:
    18px SimSun,
    serif;
  color: #fff5dd;
  margin-bottom: 6px;
}
.name small {
  font: 10px "Microsoft YaHei";
  color: #e1d8bc;
  letter-spacing: 0.1em;
  margin-left: 4px;
}
.bar {
  width: min(15vw, 230px);
  height: 7px;
  box-shadow: 0 0 0 1px #d6c5a270;
  background: #182121cc;
  transform: skewX(-13deg);
}
.bar + .bar {
  height: 4px;
  margin-top: 5px;
  width: min(12vw, 180px);
}
.bar i,
.bossBar i {
  height: 100%;
  transition: width 0.12s;
}
.life i,
.bossBar i {
  background: linear-gradient(90deg, #843f31, #d18b68);
}
.qi i {
  background: #8ec6b8;
}
.place {
  left: 50%;
  top: 4%;
  transform: translateX(-50%);
  font:
    18px KaiTi,
    SimSun,
    serif;
  display: flex;
  gap: 13px;
  align-items: center;
  letter-spacing: 0.18em;
}
.place i {
  width: 28px;
  height: 1px;
  background: #dacba7aa;
}
.objective {
  right: 2.7%;
  top: 4%;
  max-width: 23%;
  padding: 4px 12px 6px;
  border-right: 2px solid #d7b87f;
  text-align: right;
  background: linear-gradient(90deg, transparent, #1422229c);
}
.objective small,
.boss small,
.paperline {
  color: #e2be81;
  font-size: 10px;
  letter-spacing: 0.22em;
}
.objective strong,
.objective span {
  display: block;
}
.objective strong {
  font:
    20px KaiTi,
    SimSun,
    serif;
  margin: 4px 0;
}
.objective span {
  font-size: 12px;
  line-height: 1.55;
  color: #eee8d9;
}
.boss {
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(42vw, 560px);
}
.boss b {
  display: block;
  font:
    32px KaiTi,
    SimSun,
    serif;
  letter-spacing: 0.26em;
}
.bossBar {
  height: 8px;
  border: 1px solid #ceb18c;
  background: #21201dba;
  padding: 1px;
}
.boss span {
  font:
    16px KaiTi,
    SimSun,
    serif;
  background: #1e2321aa;
  color: #ffe3ae;
  display: inline-block;
  margin-top: 7px;
}
.boss span:empty {
  display: none;
}
#labels {
  inset: 0;
}
.tag {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  font-size: 12px;
  color: #f7f2de;
  text-align: center;
  letter-spacing: 0.04em;
  background: #13241fad;
  padding: 3px 6px;
  border-bottom: 1px solid #c5b0868a;
}
.tag.goal {
  color: #ffe0a6;
}
.tag strong {
  color: #f3b09a;
}
.tag em {
  display: block;
  background: #b86d4e;
  height: 3px;
  margin-top: 4px;
}
.tag.pointer {
  font-size: 13px;
}
.tag.lantern {
  border: 0;
  background: none;
  font:
    17px SimSun,
    serif;
  text-shadow: 0 0 5px #292119;
  color: #ffdda0;
}
#target {
  width: 18px;
  height: 18px;
  border: 2px solid #ffe7aa;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 8px #302615;
}
#msg {
  bottom: 19%;
  left: 50%;
  transform: translateX(-50%);
  color: #f5deb4;
  background: linear-gradient(
    90deg,
    transparent,
    #11201cde 16%,
    #11201cde 84%,
    transparent
  );
  padding: 8px 32px;
  text-align: center;
  font:
    16px KaiTi,
    SimSun,
    serif;
  white-space: nowrap;
}
#msg:empty {
  display: none;
}
#prompt {
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  background: #1c2726e8;
  border: 1px solid #ddc79f;
  padding: 8px 18px;
  border-radius: 2px;
  color: #fbecd1;
}
#slots {
  left: 3%;
  bottom: 4%;
  display: flex;
  gap: 10px;
  align-items: end;
}
.slot {
  background: linear-gradient(0deg, #101b1cbb, transparent);
  padding: 5px 2px;
  font-size: 11px;
  text-align: center;
  color: #ece4d0;
}
.slot kbd {
  display: block;
  margin: 0 auto 5px;
}
kbd {
  font:
    11px "Segoe UI",
    sans-serif;
  padding: 3px 6px;
  color: #f6eacf;
  background: #14201fde;
  border: 1px solid #b7ac90;
  border-radius: 3px;
  min-width: 20px;
  text-align: center;
}
#nav {
  right: 3%;
  bottom: 4%;
  display: flex;
  gap: 12px;
}
#nav button {
  background: #152120c9;
  border: 1px solid #b1a58b77;
  padding: 6px 12px;
  font-size: 12px;
}
#overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #071211bc, #121b1a52);
  backdrop-filter: blur(3px);
  z-index: 5;
}
#paper {
  background: linear-gradient(125deg, #263733fa, #142322fb);
  border: 1px solid #baa1709c;
  box-shadow: 0 14px 80px #03100cd6;
  position: relative;
  max-height: 90vh;
  overflow: auto;
  width: min(640px, 91vw);
  padding: clamp(20px, 3.1vw, 45px);
}
.paperline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.paperline i {
  width: 25px;
  height: 1px;
  background: #c8a26c;
}
h2 {
  font:
    normal 38px/1.2 KaiTi,
    SimSun,
    serif;
  letter-spacing: 0.08em;
  margin: 13px 0 18px;
}
#body {
  color: #d3d7cb;
  font-size: 15px;
  line-height: 1.85;
}
#choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
#choices button {
  border: 1px solid #9b907273;
  color: #e3d8b9;
  background: #253932a6;
  padding: 9px 15px;
  font-size: 14px;
}
#choices button:first-child,
#choices button:hover,
#choices button:focus {
  background: #d9c49a;
  color: #24312b;
}
#loading {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: #142020ec;
  place-items: center;
  font:
    25px KaiTi,
    serif;
  letter-spacing: 0.15em;
}
#loading:not([hidden]) {
  display: grid;
}
[hidden] {
  display: none !important;
}
.keygrid,
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 20px;
}
.keygrid div,
.settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #899c8e33;
  padding: 3px 0;
  font-size: 13px;
}
.settings {
  grid-template-columns: 1fr;
}
.settings select,
.settings button {
  background: #30413b;
  color: #e6dfcc;
  border: 1px solid #827b65;
  padding: 4px 8px;
}
.settings input {
  accent-color: #d7bd8e;
}
.atlas {
  width: 100%;
  height: min(38vh, 300px);
  display: block;
  background: #d3c6a6;
}
.notelist {
  font-size: 13px;
  line-height: 1.8;
  margin: 7px 0;
}
.muted {
  color: #bfbda7;
  font-size: 12px;
}
@media (max-height: 580px) {
  .titlecopy {
    top: 49%;
  }
  .verse {
    margin: 6px 0;
  }
  .startlist {
    margin-top: 12px;
  }
  .roman {
    margin-bottom: 9px;
  }
  h1 {
    font-size: 65px;
  }
  .titlefoot {
    bottom: 2%;
  }
  #paper {
    padding: 17px 24px;
  }
  h2 {
    font-size: 28px;
    margin: 9px 0;
  }
  #choices {
    margin-top: 12px;
  }
}

#paper.portraitPanel {
  width: min(840px, 92vw);
  padding-right: clamp(230px, 25vw, 300px);
  min-height: 310px;
}
#portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32%;
  background-size: cover;
  background-position: 50% 30%;
  mask-image: linear-gradient(90deg, transparent, #000 23%);
  pointer-events: none;
}
@media (max-width: 650px) {
  #paper.portraitPanel {
    padding-right: 24px;
    padding-top: 100px;
  }
  #portrait {
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-position: 50% 35%;
    mask-image: linear-gradient(0deg, transparent, #000 40%);
  }
}
.settings.keygrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#route {position:absolute;left:50%;top:9%;transform:translateX(-50%);display:flex;align-items:center;gap:.65em;padding:6px 15px 7px 9px;background:#152321ec;color:#ffedc4;border:1px solid #d7b57c;box-shadow:0 2px 9px #07151288;pointer-events:none}
#route i {font: bold 24px/32px serif;text-align:center;width:32px;height:32px;border:1px solid #cba76f;border-radius:50%;color:#ffe5a0}
#route small,#route b {display:block;text-align:left;line-height:1.4}
#route small {color:#d8c69f;font-size:11px} #route b {font-size:15px}
.tag.goal,.tag.pointer {color:#ffedb7;background:#172824ed;border:1px solid #e2be7a;font-weight:700;text-shadow:none;padding:4px 9px;border-radius:2px}
.tag.pointer i {display:inline-block;font-style:normal}
.tag.trail {font-size:20px;color:#ffda87;text-shadow:0 2px 3px #14261e}
#growth {position:absolute;left:50%;bottom:23%;transform:translateX(-50%);font-size:14px;color:#ffe8ae;text-align:center;text-shadow:0 1px 4px #000;background:#17241fdd;padding:5px 10px;pointer-events:none}
#growth:empty {display:none}
.fieldnote {display:grid;grid-template-columns:auto 1fr;column-gap:12px;border-bottom:1px solid #81948650;padding:9px 0}
.fieldnote small {align-self:center;color:#ddbd80}.fieldnote span {grid-column:2;color:#c4cbc1;font-size:14px}
.fieldnote.complete small {color:#a3d4ac}
@media(max-width:760px){#route {top:18%;}#route b {font-size:12px}#growth {width:max-content;max-width:85%}}
#choices:has([aria-current]) button {background:#253932a6;color:#e3d8b9}#choices button[aria-current="page"] {background:#d9c49a;color:#24312b}
.fieldnote {min-height:46px;align-content:center}