@font-face {
  font-family: Palimpsest;
  src: url("assets/palimpsest.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: Road;
  src: url("assets/sans.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #122724;
  --paper: #e4d5b2;
  --gold: #c8a874;
  --muted: #a6b3a2;
  --line: #b5a47633;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101e1d;
  color: var(--paper);
  font:
    13px Road,
    Arial,
    sans-serif;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  background: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
input:focus-visible {
  outline: 2px solid #e1bd80;
  outline-offset: 5px;
}
button {
  transition:
    color 160ms ease,
    background-color 160ms ease;
}
button:hover {
  color: #fff0ce;
}
[hidden] {
  display: none !important;
}
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 30px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Palimpsest, Georgia, serif;
  font-weight: normal;
}
.masthead {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.wordmark {
  font:
    24px Palimpsest,
    serif;
  color: #d7c7a3;
  text-decoration: none;
  white-space: nowrap;
}
.diya-mark {
  color: var(--gold);
  font-size: 36px;
  vertical-align: -3px;
  margin-right: 8px;
}
.chapter {
  font:
    italic 15px Palimpsest,
    serif;
  color: #9ea998;
}
.masthead nav {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-left: auto;
}
.masthead nav button {
  font-size: 11px;
  color: #bac2b1;
  padding: 10px 0;
}
.masthead nav kbd {
  margin-left: 4px;
  font-size: 9px;
  color: #7f9184;
}
kbd {
  font:
    10px Road,
    sans-serif;
  color: #d8c79f;
  display: inline-block;
  border: 1px solid #a79d6c44;
  padding: 3px 5px;
  border-radius: 2px;
  white-space: nowrap;
}
.game-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #19322e;
  box-shadow: 0 20px 80px #0005;
  border: 1px solid #b5a47633;
}
#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  outline: none;
}
.screen {
  position: absolute;
  inset: 0;
  z-index: 6;
}
.title-art {
  position: absolute;
  inset: 0;
  background: url("assets/pilgrimage.png") center 58% / cover;
}
.title-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #081b20e8 0%, #0c2028bc 27%, #10222d00 70%),
    linear-gradient(0deg, #0c1e23de, transparent 30%);
}
.title-copy {
  position: absolute;
  top: 10%;
  left: 8%;
  width: 40%;
}
.title-ornament {
  font-size: 22px;
  color: #cda870;
  margin-bottom: 20px;
}
.title-kicker {
  font:
    14px Palimpsest,
    serif;
  letter-spacing: 0.07em;
  color: #b3c3b5;
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(52px, 7.5vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: #eee0ba;
  text-shadow: 0 4px 24px #04141b88;
}
.title-description {
  font:
    19px/1.6 Palimpsest,
    serif;
  color: #bbccbb;
  margin-top: 22px;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  min-height: 48px;
  min-width: 230px;
  padding: 13px 22px;
  border: 1px solid #d0ae6d88;
  background: #20372edd;
  color: #ebdab4;
  font-family: Palimpsest, serif;
  font-size: 18px;
  box-shadow: inset 0 0 0 3px #a79c6833;
}
.primary:hover {
  background: #405042;
  color: #fff1d2;
}
.primary span {
  color: #d5b279;
}
.title-copy .primary {
  margin-top: 28px;
}
.text-button {
  display: block;
  padding: 11px 0;
  font-size: 12px;
  color: #b9c4ac;
}
.title-note {
  font:
    italic 12px Palimpsest,
    serif;
  color: #a1b49f;
  margin-top: 18px;
}
.title-bottom {
  position: absolute;
  bottom: 25px;
  left: 4%;
  right: 4%;
  display: flex;
  justify-content: space-between;
  color: #adbea9;
  font-size: 10px;
  letter-spacing: 0.03em;
}
.title-bottom i {
  color: var(--gold);
  padding: 0 10px;
}
.control-rail {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 18px 0 24px;
  color: #a8b6a5;
  font-size: 10px;
}
.control-rail kbd {
  margin-right: 5px;
}
.rail-note {
  margin-left: auto;
  font:
    italic 13px Palimpsest,
    serif;
  color: #8f9e8c;
}
.veil {
  background: #102522db;
  display: grid;
  place-items: center;
  backdrop-filter: blur(3px);
}
.panel {
  text-align: center;
  max-width: 500px;
  padding: 24px;
}
.panel .ornament {
  font-size: 32px;
  color: #d8b379;
  display: block;
  margin-bottom: 18px;
}
.eyebrow {
  font:
    12px/1.5 Road,
    sans-serif;
  color: #9caf9c;
  letter-spacing: 0.035em;
  margin-bottom: 12px;
}
.panel h2 {
  font-size: 62px;
  line-height: 1.03;
  margin-bottom: 24px;
  color: #e4d5b1;
}
.panel p:not(.eyebrow) {
  font:
    16px/1.7 Palimpsest,
    serif;
  color: #bdc8b4;
  margin-bottom: 22px;
}
.panel .primary {
  margin: 0 auto 8px;
}
.panel .text-button {
  margin: auto;
}
.death {
  background: #14221de8;
}
.death h2 {
  color: #cfa47d;
}
.panel #completion-stats {
  font-size: 12px;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: 0 2px 5px #091c16;
}
.vitals {
  position: absolute;
  left: 26px;
  top: 24px;
  width: 220px;
}
.vital-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    12px Palimpsest,
    serif;
  margin-bottom: 9px;
}
.small-diya {
  font-size: 21px;
  color: #d5b477;
}
.bar {
  height: 7px;
  background: #11251edb;
  border: 1px solid #bdac7755;
  box-shadow: 0 2px 4px #102217;
}
.bar i,
.boss-bar i {
  display: block;
  height: 100%;
  transform-origin: left;
  transition: transform 150ms var(--ease-out);
}
.hp i {
  background: linear-gradient(90deg, #84634d, #b68a6d);
}
.stamina {
  width: 75%;
  height: 4px;
  margin-top: 5px;
}
.stamina i {
  background: #9aa778;
}
#health-numbers {
  display: block;
  font-size: 9px;
  color: #bbbea2;
  margin-top: 5px;
}
.possessions {
  position: absolute;
  right: 26px;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 9px;
  color: #b8c3ac;
}
.possessions #oil-count {
  font:
    26px Palimpsest,
    serif;
  color: #e1c58c;
}
.possessions #seal-state {
  margin-top: 8px;
  color: #9baa98;
}
.location {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 260px;
}
.location #region {
  display: block;
  font:
    21px Palimpsest,
    serif;
  color: #e5d8b1;
}
.location #objective {
  display: block;
  font-size: 9px;
  color: #b7c3a9;
  margin-top: 5px;
}
.equipment {
  position: absolute;
  bottom: 25px;
  left: 25px;
  display: flex;
  gap: 10px;
}
.slot {
  background: #182c25c9;
  border: 1px solid #baa26d55;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 6px;
  font-size: 9px;
  min-width: 80px;
  align-items: center;
}
.slot > span:first-child {
  grid-row: span 2;
  font-size: 24px;
  color: #c4af81;
}
.slot kbd {
  font-size: 8px;
  width: fit-content;
  padding: 1px 4px;
}
.slot > span.flask-icon {
  font-size: 27px;
}
#interact-prompt {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  max-width: 400px;
  padding: 10px 15px;
  background: #152b23e6;
  border: 1px solid #c6b77a55;
  font:
    16px Palimpsest,
    serif;
  white-space: nowrap;
}
#interact-prompt kbd {
  margin-right: 10px;
  vertical-align: 2px;
}
#upgrade-prompt {
  display: block;
  font:
    10px Road,
    sans-serif;
  color: #b5bfa7;
  margin-top: 8px;
}
.boss-bar {
  height: 7px;
  background: #17281e;
  border: 1px solid #b6a16a88;
}
.boss-bar i {
  background: linear-gradient(90deg, #836348, #bea072);
}
#boss-hud {
  position: absolute;
  bottom: 24px;
  left: 26%;
  width: 48%;
}
#boss-hud > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
  font:
    20px Palimpsest,
    serif;
}
#boss-hud small {
  font:
    9px Road,
    sans-serif;
  color: #c0b999;
}
#subtitle {
  position: absolute;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  text-align: center;
  font:
    16px/1.5 Palimpsest,
    serif;
  color: #dfd1aa;
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
  background: #15281dd9;
  padding: 6px 14px;
}
#subtitle.visible {
  opacity: 1;
}
#area-banner {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 250ms var(--ease-out);
  width: 70%;
}
#area-banner.visible {
  opacity: 1;
}
#area-banner > span {
  font:
    italic 15px Palimpsest,
    serif;
  color: #c0c8ac;
}
#area-banner strong {
  display: block;
  font:
    48px Palimpsest,
    serif;
  color: #e8dbb5;
  margin: 6px 0 16px;
}
#area-banner i {
  display: block;
  margin: auto;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cfb078, transparent);
}
#victory-banner {
  position: absolute;
  top: 32%;
  left: 0;
  right: 0;
  text-align: center;
  background: linear-gradient(90deg, transparent, #12291fe8, transparent);
  padding: 18px;
  color: #e5c892;
}
#victory-banner span {
  font-size: 10px;
  letter-spacing: 0.14em;
}
#victory-banner strong {
  display: block;
  font:
    44px Palimpsest,
    serif;
  margin-top: 8px;
}
dialog {
  color: var(--paper);
  background: #192e28;
  border: 1px solid #aa996b88;
  padding: 0;
  box-shadow: 0 24px 100px #0009;
}
dialog::backdrop {
  background: #061c18a8;
}
.story-dialog {
  width: min(740px, 92vw);
  max-width: none;
  margin: auto auto 8vh;
  background: #172b25f5;
}
.story-layout {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 30px 40px;
}
.story-symbol {
  font-size: 28px;
  color: #c5aa78;
  padding-top: 20px;
}
.story-dialog h2 {
  font-size: 30px;
  margin-bottom: 15px;
}
.story-dialog #story-body {
  font:
    20px/1.6 Palimpsest,
    serif;
  min-height: 65px;
  white-space: pre-line;
  color: #e1d6b9;
}
.story-dialog footer {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #9fac95;
}
.story-dialog footer button {
  color: #dac494;
}
.story-dialog footer kbd {
  margin-left: 9px;
}
.book-dialog {
  width: min(1000px, 94vw);
  max-height: 88vh;
  padding: 35px 40px;
  overflow: auto;
}
.book-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 25px;
}
.book-dialog h2 {
  font-size: 38px;
}
.book-dialog h3 {
  font-size: 24px;
  margin: 0 0 18px;
  color: #dac89f;
}
.close-dialog {
  font-size: 20px;
  padding: 5px 8px;
  color: #a3b49c;
}
.book-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 55px;
}
.book-layout article {
  margin-bottom: 28px;
}
.book-layout article h4 {
  font:
    22px Palimpsest,
    serif;
  color: #d9c49b;
  margin: 0 0 9px;
}
.book-layout p,
.book-layout blockquote,
.controls-dialog p {
  font:
    16px/1.7 Palimpsest,
    serif;
  color: #bbc8b0;
}
.book-layout blockquote {
  margin: 0 0 14px;
  font-style: italic;
  color: #dbcbab;
}
.book-layout aside {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.book-layout aside h3:not(:first-child) {
  margin-top: 30px;
}
.book-layout dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 11px;
  line-height: 1.6;
  margin: 20px 0;
  color: #aaba9f;
}
.book-layout dd {
  text-align: right;
  margin: 0;
  color: #dac89f;
}
.empty-journal {
  padding: 20px 0;
  font-style: italic !important;
}
.map-dialog #world-map {
  width: 100%;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--line);
}
.map-labels {
  display: grid;
  grid-template-columns: 32% 25% 17% 26%;
  font:
    14px Palimpsest,
    serif;
  color: #d3c49e;
  text-align: center;
  margin: 15px 0;
}
.map-key {
  font-size: 11px;
  color: #aebba6;
  margin: 22px 0 12px;
}
.map-dialog #map-objective {
  font:
    18px Palimpsest,
    serif;
  color: #dcc99d;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
}
.help-grid p {
  margin-bottom: 15px;
}
.setting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  flex-wrap: wrap;
}
.setting small {
  color: #a5b79b;
  font-size: 11px;
}
.setting input {
  accent-color: #b6a16f;
}
.muted {
  font-size: 12px !important;
  color: #8fa28d !important;
}
.touch-controls {
  display: none;
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}
.touch-controls button {
  pointer-events: auto;
  touch-action: none;
  background: #10251bbd;
  border: 1px solid #d2b57566;
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
  font-size: 12px;
  user-select: none;
}
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 4px;
}
.dpad button:first-child {
  grid-column: 2;
}
.dpad button:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.dpad button:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.dpad button:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}
.touch-actions {
  display: grid;
  grid-template-columns: repeat(2, 48px);
  gap: 5px;
}
@media (min-width: 1800px) {
  main {
    padding-top: 20px;
  }
  .title-copy {
    top: 15%;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 15px;
  }
  .masthead {
    height: 65px;
    gap: 20px;
  }
  .chapter {
    display: none;
  }
  .masthead nav {
    gap: 18px;
  }
  .control-rail {
    gap: 12px;
  }
  .rail-note {
    display: none;
  }
  .title-copy {
    top: 7%;
  }
  .title-ornament {
    margin-bottom: 10px;
  }
  .title-description {
    font-size: 16px;
    margin-top: 15px;
  }
  .title-copy .primary {
    margin-top: 18px;
  }
  .title-note {
    margin-top: 12px;
  }
  .title-bottom {
    bottom: 15px;
  }
  .vitals {
    left: 18px;
    top: 18px;
    width: 160px;
  }
  .possessions {
    right: 18px;
    top: 16px;
  }
  .location {
    top: 18px;
  }
  .equipment {
    left: 18px;
    bottom: 18px;
  }
  .location #region {
    font-size: 18px;
  }
}
@media (max-width: 700px) {
  main {
    padding: 0;
  }
  .masthead {
    height: 58px;
    padding: 0 14px;
  }
  .wordmark {
    font-size: 21px;
  }
  .masthead nav {
    gap: 15px;
  }
  .masthead nav kbd {
    display: none;
  }
  .masthead nav button {
    font-size: 10px;
  }
  .masthead nav #pause-button {
    display: none;
  }
  .game-frame {
    aspect-ratio: 4/3;
    border-left: 0;
    border-right: 0;
  }
  #game {
    object-fit: cover;
  }
  .title-art {
    background-position: 60% center;
  }
  .title-copy {
    top: 10%;
    left: 7%;
    width: 70%;
  }
  .title-copy h1 {
    font-size: 66px;
  }
  .title-kicker {
    font-size: 12px;
  }
  .title-ornament {
    display: none;
  }
  .title-description {
    font-size: 16px;
  }
  .title-copy .primary {
    min-width: 210px;
    font-size: 16px;
    min-height: 42px;
  }
  .title-note {
    display: none;
  }
  .title-bottom {
    font-size: 8px;
    left: 7%;
    right: 7%;
    bottom: 14px;
  }
  .title-bottom span:last-child {
    display: none;
  }
  .title-shade {
    background: linear-gradient(90deg, #081b20e8, #0c202886 60%, #10222d00);
  }
  .control-rail {
    padding: 12px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 9px;
  }
  .control-rail span:nth-last-child(2) {
    display: none;
  }
  .vitals {
    left: 12px;
    top: 12px;
    width: 118px;
  }
  .vital-heading {
    font-size: 10px;
    gap: 5px;
  }
  .small-diya {
    font-size: 15px;
  }
  .location {
    top: 15px;
    width: 150px;
  }
  .location #region {
    font-size: 14px;
  }
  .location #objective {
    font-size: 8px;
  }
  .possessions {
    right: 12px;
    top: 12px;
  }
  .possessions #oil-count {
    font-size: 22px;
  }
  .possessions #seal-state {
    font-size: 8px;
  }
  .equipment {
    display: none;
  }
  #area-banner strong {
    font-size: 35px;
  }
  #area-banner > span {
    font-size: 12px;
  }
  #interact-prompt {
    bottom: 115px;
    font-size: 12px;
    max-width: 90%;
    padding: 6px 8px;
  }
  #upgrade-prompt {
    font-size: 8px;
  }
  #boss-hud {
    bottom: 115px;
    left: 18%;
    width: 64%;
  }
  #boss-hud > div:first-child {
    font-size: 16px;
  }
  #boss-hud small {
    display: none;
  }
  #subtitle {
    font-size: 13px;
    bottom: 155px;
  }
  #victory-banner strong {
    font-size: 30px;
  }
  .panel h2 {
    font-size: 42px;
  }
  .panel p:not(.eyebrow) {
    font-size: 14px;
  }
  .panel .eyebrow {
    font-size: 10px;
  }
  .panel .primary {
    min-height: 40px;
    font-size: 16px;
  }
  .panel {
    padding: 18px;
  }
  .panel .ornament {
    display: none;
  }
  .story-layout {
    padding: 22px;
    grid-template-columns: 1fr;
  }
  .story-symbol {
    display: none;
  }
  .story-dialog h2 {
    font-size: 25px;
  }
  .story-dialog #story-body {
    font-size: 17px;
  }
  .book-dialog {
    padding: 25px;
  }
  .book-dialog h2 {
    font-size: 29px;
  }
  .book-layout,
  .help-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .book-layout aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
  .map-labels {
    font-size: 10px;
  }
  .setting small {
    display: block;
  }
  .title-description {
    line-height: 1.5;
  }
}
@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
  .control-rail {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .bar i,
  .boss-bar i,
  #area-banner,
  #subtitle {
    transition: none;
  }
}
@media (max-width: 700px) and (orientation: portrait) {
  .game-frame {
    aspect-ratio: 4/5;
  }
  #game {
    object-fit: fill;
  }
  .location {
    top: 16px;
    width: 145px;
  }
  .location #objective {
    display: none;
  }
  .vitals {
    width: 104px;
  }
  .possessions {
    max-width: 105px;
  }
  .possessions #seal-state {
    display: none;
  }
  #area-banner {
    top: 32%;
    width: 85%;
  }
  #area-banner strong {
    font-size: 32px;
  }
  #interact-prompt {
    bottom: 110px;
    max-width: 92%;
    white-space: normal;
    width: max-content;
  }
  #subtitle {
    bottom: 165px;
    max-width: 90%;
    width: max-content;
  }
  #boss-hud {
    bottom: 115px;
  }
  .title-copy {
    top: 14%;
  }
  .title-copy h1 {
    font-size: 78px;
  }
  .title-description {
    margin-top: 24px;
  }
  .title-copy .primary {
    margin-top: 25px;
  }
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
main {
  width: 100%;
  max-width: min(1600px, calc((100dvh - 145px) * 1.77778 + 60px));
}
.diya-mark {
  vertical-align: -7px;
}

@media (max-width: 700px) {
  main {
    max-width: none;
  }
}
@media (max-height: 700px) and (min-width: 701px) {
  .title-copy {
    top: 9%;
  }
  .title-copy h1 {
    font-size: clamp(45px, 10vh, 78px);
  }
  .title-ornament {
    display: none;
  }
  .title-copy .title-description {
    font-size: 15px;
    margin-top: 14px;
  }
  .title-copy .primary {
    margin-top: 18px;
    min-height: 40px;
  }
  .title-note {
    display: none;
  }
  .title-bottom {
    bottom: 12px;
  }
  .masthead {
    height: 62px;
  }
  .chapter {
    display: none;
  }
}
#upgrade-prompt {
  pointer-events: auto;
  min-height: 34px;
  width: 100%;
  padding: 8px 5px;
  margin-top: 3px;
  color: #d1c097;
  border-top: 1px solid #b5a47633;
}
#upgrade-prompt:hover {
  color: #ffe2a5;
  background: #a8975b22;
}
@media (max-width: 700px) {
  .masthead {
    gap: 8px;
  }
  .masthead nav {
    gap: 9px;
  }
  .masthead nav #pause-button {
    display: block;
  }
  .wordmark {
    font-size: 20px;
  }
}
.raster-icon {
  display: inline-block;
  background-image: url("assets/pilgrim-items.png");
  background-size: 200% 200%;
  width: 32px;
  height: 32px;
  vertical-align: middle;
}
.diya-icon {
  background-position: 100% 100%;
  margin-right: 8px;
}
.blade-icon {
  background-position: 100% 0;
}
.bottle-icon {
  background-position: 0 100%;
}
.slot .raster-icon {
  grid-row: span 2;
  width: 28px;
  height: 34px;
}
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #102522;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}
#loading-screen h2 {
  font-size: 40px;
}
#loading-screen progress {
  width: 260px;
  accent-color: #cfad72;
}
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}
.offer-grid button {
  border: 1px solid #b4a16b66;
  padding: 24px;
  text-align: left;
  background: #243b30;
}
.offer-grid p {
  font: 17px/1.5 Palimpsest;
  margin-bottom: 20px;
}
.offer-grid span {
  color: #d4b877;
}
#offerings-button {
  pointer-events: auto;
  border-top: 1px solid #b5a47633;
  width: 100%;
  padding: 10px;
  color: #ddc48f;
}
.game-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
}
.game-frame:fullscreen canvas {
  object-fit: contain;
  background: #0b1915;
}
.large-world main {
  max-width: 1600px;
}
@media (max-width: 700px) {
  .offer-grid {
    grid-template-columns: 1fr;
  }
  .masthead nav {
    gap: 6px;
  }
  .chapter {
    display: none;
  }
  #fullscreen-button {
    font-size: 9px;
  }
  .wordmark {
    font-size: 16px;
  }
}
#subtitle {
  bottom: auto;
  top: 100px;
  height: max-content;
}
@media (max-width: 700px) {
  #subtitle {
    top: 88px;
    bottom: auto;
    font-size: 12px;
  }
}
.vitals {
  background: #0a1817f2;
  border: 1px solid #c4af7c88;
  padding: 12px 14px;
  width: 260px;
  box-shadow: 0 3px 14px #0009;
}
.bar.hp {
  height: 14px;
  border-color: #edcba0;
}
.hp i {
  background: #ce765d;
}
.bar.stamina {
  height: 8px;
  background: #172c1e;
}
.stamina i {
  background: #b3c787;
}
#health-numbers {
  font-size: 12px;
  color: #fff0cd;
}
.vital-heading {
  font-size: 15px;
  color: #ffebbd;
}
.possessions {
  background: #0a1817ee;
  padding: 10px 16px;
  border: 1px solid #c4af7c66;
}
.location {
  background: #0a1817e8;
  padding: 8px;
  width: 330px;
}
#wayfinder {
  display: block;
  font-size: 11px;
  color: #ffe1a5;
  margin: 7px 0;
}
.location #objective {
  font-size: 11px;
}
.boss-bar {
  height: 14px;
}
#boss-hud {
  background: #0a1817e8;
  padding: 12px;
  border: 1px solid #c4af7c66;
}
.map-labels {
  grid-template-columns: repeat(8, 1fr);
  font-size: 11px;
}
.vitals,
.possessions,
.location {
  z-index: 2;
}
#interact-prompt {
  z-index: 3;
}
@media (max-width: 700px) {
  .vitals {
    width: 130px;
    padding: 7px;
    top: 10px;
    left: 8px;
  }
  .vital-heading {
    font-size: 10px;
  }
  .bar.hp {
    height: 10px;
  }
  #health-numbers {
    font-size: 10px;
  }
  .location {
    top: 95px;
    width: 94%;
    padding: 5px;
  }
  .location #objective {
    display: none;
  }
  #wayfinder {
    font-size: 9px;
  }
  .possessions {
    right: 8px;
    padding: 6px;
  }
  .map-labels {
    font-size: 8px;
  }
}
.story-symbol {
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.story-layout {
  grid-template-columns: 70px 1fr;
}
.bar {
  overflow: hidden;
}
#boss-fill {
  background: #d28b60;
}
#build-summary {
  color: #f1d39b;
  font-size: 14px;
  line-height: 1.8;
  margin-top: 15px;
}
@media (max-width: 700px) {
  .story-layout {
    grid-template-columns: 50px 1fr;
    padding: 20px;
    gap: 12px;
  }
  .story-symbol {
    width: 48px;
    height: 48px;
  }
  .story-dialog h2 {
    font-size: 25px;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .vitals {
    width: 190px;
    padding: 9px;
  }
  .vital-heading {
    font-size: 12px;
  }
  .location {
    width: 265px;
  }
  .possessions {
    padding: 8px;
  }
}
#subtitle {
  top: 150px;
}
@media (max-width: 700px) {
  #subtitle {
    top: 165px;
  }
  #area-banner {
    top: 43%;
  }
}
.quest-track {
  padding: 8px 14px;
  border: 1px solid #c8ad7577;
  color: #efd8a2;
  margin: 12px 0;
  background: #294437;
}
.vital-heading .raster-icon {
  width: 20px;
  height: 24px;
  margin-right: 0;
}
.in-world .chapter,
#objective,
#area-banner,
#upgrade-prompt {
  display: none !important;
}
.location {
  padding: 7px 12px;
}
.location #region {
  font-size: 18px;
}
#wayfinder {
  font-size: 10px;
  margin: 5px 0 0;
}
#offerings-button {
  font-size: 12px;
  padding: 7px;
}
#interact-prompt {
  font-size: 14px;
  padding: 8px 12px;
}
#boss-hud small {
  display: none;
}
.control-rail .rail-note {
  display: none;
}
.in-world .vital-heading {
  font-size: 12px;
}
.in-world .equipment .slot {
  font-size: 9px;
}
.story-dialog .eyebrow {
  font-size: 10px;
}
.possessions #seal-state {
  display: none;
}
#subtitle {
  font-size: 15px;
  padding: 5px 12px;
}
.map-labels {
  grid-template-columns: 2560fr repeat(4, 3200fr);
}
.experienced.in-world .control-rail {
  visibility: hidden;
}

.map-labels {
  grid-template-columns: 1fr;
  gap: 5px;
  text-align: left;
}
.map-dialog #world-map {
  aspect-ratio: 16 / 9;
  max-height: 55vh;
  object-fit: contain;
}

.map-dialog {
  padding: 24px;
}
.map-dialog header {
  margin-bottom: 18px;
}
.map-dialog h2 {
  font-size: 32px;
}
.map-dialog #world-map {
  max-height: 48vh;
}
.map-dialog .map-labels {
  font-size: 11px;
  margin: 8px 0;
}
.map-dialog .map-key {
  margin: 8px 0;
}
.map-dialog #map-objective {
  font-size: 14px;
  margin: 6px 0;
}

/* The game owns the entire viewport, including when native fullscreen is denied. */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
main,
.large-world main {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
}
.game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
}
#game,
.game-frame:fullscreen canvas {
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.masthead,
.control-rail {
  display: none;
}
#hud .location {
  background: transparent;
  border: 0;
  top: 22px;
  padding: 0;
}
#hud .location #region {
  font-size: 17px;
}
#objective {
  display: none;
}
#menu-button {
  position: absolute;
  right: 150px;
  top: 24px;
  padding: 7px 10px;
  pointer-events: auto;
  background: #102923df;
  border: 1px solid #b9a77a66;
  color: #dcc99d;
}
.pause-route {
  max-width: 320px;
  margin: 12px auto 24px;
  color: #c3b58d;
}
#pause-screen .panel .text-button {
  display: block;
  margin: 10px auto;
}
#controls {
  max-height: 90dvh;
  overflow: auto;
}
.guide-details {
  margin-top: 24px;
}
#guide-continue {
  position: sticky;
  bottom: 0;
  margin-top: 22px;
  box-shadow: 0 0 16px #102923;
}
#fullscreen-button {
  display: none;
}
@media (max-width: 700px) {
  #menu-button {
    right: 116px;
    top: 14px;
  }
  #hud .location {
    top: 100px;
  }
  #hud .location #region {
    font-size: 14px;
  }
}

#settings-fullscreen {
  display: none;
}
.guide-footer {
  position: sticky;
  bottom: -1px;
  padding: 14px 0;
  background: #1b332b;
  border-top: 1px solid #b9a77a44;
  margin-top: 22px;
  z-index: 2;
}
#guide-continue {
  position: static;
  display: block;
  margin: 0 0 0 auto;
  background: #d3bb85;
  color: #142923;
  box-shadow: none;
}

#controls[open] {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(900px, calc(100vw - 32px));
  max-height: 90dvh;
  padding: 24px;
  overflow: hidden;
}
#controls > header {
  flex-shrink: 0;
  margin: 0;
  padding-bottom: 16px;
}
#controls h2 {
  font-size: clamp(26px, 4vw, 36px);
}
#controls .guide-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding-right: 12px;
}
#controls .guide-footer {
  position: static;
  flex-shrink: 0;
  margin: 0;
  padding: 14px 0 0;
  background: #1b332b;
}
@media (max-width: 500px) {
  #controls[open] {
    padding: 18px;
  }
  #guide-continue {
    width: 100%;
  }
}

#story-portrait {
  width: 100%;
  min-height: 280px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  align-self: stretch;
}
#story.npc-conversation {
  width: min(960px, calc(100vw - 32px));
}
#story.npc-conversation .story-layout {
  grid-template-columns: minmax(190px, 32%) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
#story.npc-conversation .story-symbol {
  display: none;
}
#story.npc-conversation #story-title {
  font-size: clamp(24px, 4vw, 38px);
}
#story.npc-conversation #story-body {
  font-size: clamp(16px, 2vw, 21px);
}
.weapon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.weapon-card {
  text-align: left;
  padding: 16px;
  min-width: 0;
  background: #18382f;
  border: 1px solid #baa37366;
  color: #e2d1ac;
}
.weapon-card h3 {
  margin: 6px 0 10px;
}
.weapon-card p {
  font-size: 13px;
  line-height: 1.5;
}
.weapon-card small {
  display: block;
  margin: 12px 0;
  color: #adcfbc;
  font-size: 12px;
  line-height: 1.7;
}
.weapon-card strong {
  display: block;
  font-size: 12px;
  color: #e8cf93;
}
.weapon-card:disabled {
  opacity: 0.42;
}
.weapon-art {
  display: block;
  width: 100%;
  height: 130px;
  background-image: url(assets/weapon-oaths.png);
  background-size: 300% 200%;
  background-repeat: no-repeat;
}
#weapon-choice {
  max-width: 1000px;
  max-height: 92dvh;
  overflow: auto;
}
#weapon-choice h2 {
  font-size: clamp(28px, 4vw, 42px);
}
#rest-progress {
  position: absolute;
  left: 35%;
  width: 30%;
  bottom: 120px;
  height: 4px;
  background: #10251fcc;
}
#rest-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: #edd096;
  transform-origin: left;
}
#rest-policy {
  display: block;
  width: 100%;
  font-size: 10px;
  margin-top: 7px;
  color: #c4c7ac;
}
#victory-reward {
  display: block;
  color: #e1cfa8;
  margin-top: 10px;
  font-size: 13px;
}
@media (max-width: 650px) {
  .weapon-grid {
    grid-template-columns: 1fr;
  }
  .weapon-art {
    width: 120px;
    height: 120px;
    float: left;
    margin-right: 12px;
  }
  #story.npc-conversation .story-layout {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }
  #story-portrait {
    min-height: 200px;
  }
  #rest-progress {
    left: 20%;
    width: 60%;
    bottom: 205px;
  }
}

.weapon-art {
  width: 130px;
  height: 130px;
  margin: 0 auto;
}
#rest-progress i {
  transition: transform 100ms linear;
}
@media (prefers-reduced-motion: reduce) {
  #rest-progress i {
    transition: none;
  }
}

#weapon-choice > header {
  margin-bottom: 14px;
  padding-bottom: 14px;
}
#weapon-choice .weapon-card {
  padding: 12px;
}
#weapon-choice .weapon-card h3 {
  font-size: 22px;
  line-height: 1.15;
  min-height: 52px;
  margin: 5px 0 8px;
}
#weapon-choice .weapon-card p {
  font-size: 12px;
  line-height: 1.4;
  min-height: 34px;
}
#weapon-choice .weapon-card small {
  font-size: 11px;
  margin: 8px 0;
}
#weapon-choice .weapon-art {
  width: 100px;
  height: 100px;
}
#story.npc-conversation .story-layout {
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
}
#story-portrait {
  min-height: 320px;
}
#victory-banner strong {
  font-size: clamp(20px, 4vw, 34px);
  max-width: 80vw;
  display: block;
  margin: auto;
}
@media (max-width: 650px) {
  #story.npc-conversation .story-layout {
    grid-template-columns: 1fr;
  }
  #story-portrait {
    width: 220px;
    min-height: 210px;
    max-height: 210px;
    margin: auto;
  }
  #story.npc-conversation {
    max-height: 92dvh;
    overflow: auto;
  }
  .weapon-card h3 {
    min-height: 0;
  }
}

#victory-reward.has-chart::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-right: 8px;
  background-image: url(assets/weapon-oaths.png);
  background-size: 300% 200%;
  background-position: 100% 100%;
}

#ending-choice {
  max-height: 92dvh;
  overflow: auto;
}
.ending-option {
  background: #18332c;
  color: #e2d0aa;
  padding: 12px;
  text-align: left;
  border: 1px solid #bca77966;
}
.ending-option p {
  font-size: 13px;
  line-height: 1.5;
}
.ending-preview {
  display: block;
  aspect-ratio: 1;
  background-image: url(assets/canon-endings.png);
  background-size: 300% 100%;
  margin-bottom: 12px;
}
#ending-art {
  width: 100%;
  min-height: 260px;
  background-image: url(assets/canon-endings.png);
  background-size: 300% 100%;
  background-repeat: no-repeat;
}
#story.ending-story {
  width: min(1050px, 94vw);
  max-height: 92dvh;
  overflow: auto;
}
#story.ending-story .story-layout {
  grid-template-columns: minmax(220px, 40%) minmax(0, 1fr);
}
#story.ending-story .story-symbol {
  display: none;
}
@media (max-width: 650px) {
  #story.ending-story .story-layout {
    grid-template-columns: 1fr;
  }
  #ending-art {
    min-height: 220px;
  }
}

#flame-button {
  position: absolute;
  bottom: 24px;
  right: 20px;
  pointer-events: auto;
  background: #19352dcc;
  color: #ddc596;
  border: 1px solid #bba17066;
  padding: 8px;
  font-size: 11px;
}
@media (max-width: 650px) {
  #flame-button {
    bottom: 150px;
    right: 18px;
  }
}
/* Keep all three consequences readable together on a laptop viewport. */
#ending-choice h2 {
  font-size: clamp(28px, 3.5vw, 42px);
}
.ending-option h3 {
  font-size: 24px;
  margin: 10px 0;
}
.ending-option .ending-preview {
  aspect-ratio: 4/3;
  max-height: 190px;
}
/* Focus the modal heading for reading order without drawing a control border. */
#ending-choice-title:focus {
  outline: none;
}
.desktop-requirement {
  margin-top: 16px;
  color: #c9c5a9;
  font:
    11px/1.5 Road,
    sans-serif;
}
#desktop-warning {
  margin-top: 18px;
  padding: 16px;
  max-width: 420px;
  background: #152e29f2;
  border: 1px solid #ccaa73;
  color: #eee0ba;
}
#desktop-warning strong {
  font:
    23px/1.2 Palimpsest,
    serif;
}
#desktop-warning p {
  margin: 10px 0 0;
  color: #c7d0bd;
  font:
    12px/1.65 Road,
    sans-serif;
}
.unsupported-device .title-copy {
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
}
.unsupported-device .title-copy .primary {
  margin-top: 16px;
  opacity: 0.4;
  cursor: not-allowed;
}
.unsupported-device #continue {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 650px) {
  .unsupported-device .title-copy h1 {
    font-size: clamp(48px, 13vw, 78px);
  }
  .unsupported-device .title-description {
    margin-top: 12px;
  }
}
