* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #111411;
  height: 100dvh;
  display: grid;
  place-items: center;
  color: ivory;
  font-family: "Segoe UI", Arial, sans-serif;
}
main {
  width: min(100vw, 177.7778dvh);
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  background: #bbb098;
  user-select: none;
}
canvas,
#scene,
#shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#shade {
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 48% 38%, transparent 40%, #18171040 100%);
}
header,
aside,
footer,
section,
small {
  position: absolute;
  z-index: 2;
  text-shadow: 0 1px 4px #171b14;
}
header,
aside,
footer,
section {
  background: linear-gradient(90deg, #121710bb, #11171083 77%, transparent);
  padding: 0.7cqw 1.1cqw;
}
header {
  left: 1.6%;
  top: 4.6%;
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  padding-right: 3.5cqw;
  font-size: 0.98cqw;
  letter-spacing: 0.07em;
}
i {
  border: 1px solid #f6f2d9;
  width: 1.55cqw;
  height: 1.55cqw;
  display: grid;
  place-content: center;
  transform: rotate(45deg);
  font-size: 1.6cqw;
  font-style: normal;
}
aside {
  right: 1%;
  top: 2.9%;
  width: 14.1%;
}
label {
  display: block;
  font-size: 1cqw;
  font-weight: 500;
}
strong {
  display: block;
  font-size: 1.75cqw;
  font-weight: 500;
  margin: 0.3cqw 0 1.25cqw;
}
b {
  display: block;
  height: 0.68cqw;
  background: #101510dd;
  margin: 0.4cqw 0 0.2cqw;
  box-shadow: 0 0 0 1px #ddd2;
}
em {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #5d964d, #a2c184);
  width: 100%;
}
footer {
  left: 1.4%;
  bottom: 4.4%;
  width: 21.8%;
  padding-right: 2.6cqw;
}
footer label:nth-of-type(2) {
  margin-top: 0.7cqw;
}
#stamina {
  background: linear-gradient(90deg, #4a9ac8, #a6d8f0);
}
section {
  right: 1.3%;
  bottom: 4.4%;
  width: 13.2%;
  font-size: 1.05cqw;
}
section div {
  display: flex;
  align-items: center;
  gap: 1.1cqw;
}
section div + div {
  margin-top: 1cqw;
}
kbd {
  display: grid;
  place-items: center;
  width: 1.9cqw;
  height: 1.75cqw;
  border: 0.14cqw solid ivory;
  border-radius: 30% 35% 50% 20%;
  font: 600 0.93cqw Arial;
}
small {
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1cqw;
  background: #172017bb;
  padding: 0.55cqw 1.1cqw;
  white-space: nowrap;
}
small:empty {
  display: none;
}
#hold {
  position: absolute;
  z-index: 2;
  width: 0.9cqw;
  height: 0.9cqw;
  border: 1px solid #ffffc9cc;
  box-shadow: 0 0 5px #25291c;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}

[hidden] {
  display: none !important;
}
header,
aside,
footer,
section {
  background: linear-gradient(90deg, rgba(16, 24, 19, 0.86), rgba(21, 28, 23, 0.65) 75%, transparent);
  border-left: 1px solid #b9bb975c;
}
#location {
  font-size: 0.68cqw;
  letter-spacing: 0.12em;
  color: #ddd3af;
  text-transform: uppercase;
  margin-top: 0.28cqw;
}
em {
  transition: width 0.14s linear;
}
b {
  height: 0.54cqw;
}
i {
  color: #f3d59a;
}
kbd {
  width: auto;
  min-width: 2.2cqw;
  padding: 0 0.2cqw;
  background: #181e19c9;
}
#menu {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(90deg, #101c18ea, #18251a7a 53%, #12180f24);
  display: flex;
  align-items: center;
  padding: 5.7cqw 7.7cqw;
  isolation: isolate;
  color: #f3eedb;
  animation: unveil 0.28s both;
}
#menu[data-page="title"] {
  background:
    linear-gradient(
      90deg,
      rgba(6, 19, 16, 0.94) 0%,
      rgba(13, 29, 22, 0.83) 27%,
      rgba(17, 34, 25, 0.23) 61%,
      transparent 82%
    ),
    linear-gradient(0deg, #101e19c9, transparent 27%),
    url("./assets/canyon.jpg") center/cover;
}
#menu::after {
  content: "";
  position: absolute;
  inset: 1.35cqw;
  pointer-events: none;
  border: 1px solid #dfc79255;
  clip-path: polygon(
    0 0,
    18% 0,
    18% 0.25%,
    0.13% 0.25%,
    0.13% 26%,
    0 26%,
    0 100%,
    0 75%,
    0.13% 75%,
    0.13% 99.75%,
    20% 99.75%,
    20% 100%,
    100% 100%,
    80% 100%,
    80% 99.75%,
    99.87% 99.75%,
    99.87% 75%,
    100% 75%,
    100% 0,
    100% 25%,
    99.87% 25%,
    99.87% 0.25%,
    81% 0.25%,
    81% 0
  );
}
.folio {
  max-width: 56cqw;
  position: relative;
}
.crest {
  width: 5.5cqw;
  color: #d1b371;
  display: block;
  margin-left: -0.46cqw;
  margin-bottom: 0.45cqw;
}
.eyebrow {
  font:
    600 0.77cqw Arial,
    sans-serif;
  color: #d8c292;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  margin: 0 0 1.1cqw;
}
h1 {
  font:
    normal 5.1cqw/0.95 Georgia,
    serif;
  letter-spacing: -0.065em;
  margin: 0;
  text-shadow: 0 0.12cqw 1cqw #0c17124d;
}
#menu[data-page="title"] h1 {
  font-size: 8.25cqw;
  letter-spacing: -0.07em;
}
.filigree {
  display: flex;
  align-items: center;
  gap: 0.65cqw;
  color: #d8b578;
  font-size: 0.8cqw;
  margin: 1.3cqw 0;
}
.filigree span {
  width: 4.2cqw;
  height: 1px;
  background: #d1b37c8c;
}
.filigree span + span {
  width: 1cqw;
}
#caption {
  font:
    italic 1.33cqw/1.5 Georgia,
    serif;
  color: #e6e2ce;
  max-width: 31cqw;
  margin: 0.6cqw 0 1.7cqw;
}
#actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45cqw;
  width: 18.3cqw;
}
button {
  background: linear-gradient(100deg, #263b2fe8, #1e3029d9);
  border: 1px solid #a899748c;
  color: #ece5cc;
  padding: 0.75cqw 1.1cqw;
  text-align: left;
  font:
    500 1.03cqw Arial,
    sans-serif;
  cursor: pointer;
  letter-spacing: 0.03em;
}
button::after {
  content: "›";
  float: right;
  color: #cbb781;
}
button:first-child {
  background: linear-gradient(100deg, #c2b17f, #dbcba1);
  color: #203326;
}
button:first-child::after {
  color: #203326;
}
button:hover,
button:focus-visible {
  outline: 1px solid #f7dd9c;
  outline-offset: 2px;
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.6;
}
.chapterstrip {
  position: absolute;
  bottom: 4.7%;
  left: 7.7%;
  right: 6%;
  display: flex;
  gap: 2.4cqw;
  align-items: center;
  font:
    small-caps 1cqw Georgia,
    serif;
  color: #ded1ae;
  letter-spacing: 0.07em;
}
.chapterstrip::before {
  content: "";
  width: 3cqw;
  height: 1px;
  background: #c1a673;
}
#menu:not([data-page="title"]) .chapterstrip {
  display: none;
}
#options {
  width: 21cqw;
  margin-top: 1.5cqw;
}
#options label {
  display: flex;
  justify-content: space-between;
  margin-top: 1cqw;
  color: #e7dcbd;
}
input[type="range"] {
  width: 100%;
  accent-color: #c9b781;
}
@keyframes unveil {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: #0e1813;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.22s;
}
body.leaving::after {
  opacity: 1;
}
#menu[data-page="select"] {
  background:
    linear-gradient(90deg, #101e18f5 8%, #16271cdd 49%, #182a2066 85%),
    url("./assets/canyon.jpg") center/cover;
}
#menu[data-page="select"] .folio {
  width: 48cqw;
  max-width: none;
}
#menu[data-page="select"] .crest {
  width: 3.7cqw;
}
#menu[data-page="select"] #actions {
  width: 40cqw;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
#menu[data-page="select"] .route {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  padding: 0.65cqw 1.15cqw;
  background: linear-gradient(100deg, #2c4335de, #182d22a3);
  border-color: #b3a47e65;
  color: #efe6ce;
  font:
    1.35cqw Georgia,
    serif;
}
.route .ordinal {
  width: 2.6cqw;
  font-size: 0.95cqw;
  color: #d5b779;
  border-right: 1px solid #9e92644d;
}
.route small {
  position: static;
  transform: none;
  margin-left: auto;
  padding: 0;
  background: none;
  font: small-caps 0.85cqw Arial;
  color: #d9c49a;
}
.route:disabled {
  opacity: 0.67;
}
.route:disabled::after {
  content: "◇";
}
#menu[data-page="select"] #caption {
  max-width: 42cqw;
  margin: 0.4cqw 0 1cqw;
}
#menu[data-page="journal"] #caption {
  white-space: pre-line;
  max-width: 54cqw;
  font-size: 1.12cqw;
}
#preset {
  display: block;
  margin-top: 1cqw;
  width: 100%;
}
#hint {
  white-space: normal;
  text-align: center;
  width: max-content;
  max-width: 47cqw;
  bottom: 4%;
  line-height: 1.4;
}
#menu[data-page="title"] .crest {
  width: 4.7cqw;
}

body[data-showcase="waterfall"] #court > :is(header, aside, footer, section, #hint, #hold) {
  display: none;
}

body[data-showcase="garden"] #court > :is(aside, footer, section, #hint, #hold) {
  display: none;
}

#technique {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translateX(-50%);
  color: #fff1c9;
  padding: 0.45em 1.05em;
  border-block: 1px solid #d3b774;
  background: linear-gradient(90deg, transparent, #18261eee 18%, #18261eee 82%, transparent);
  font:
    600 clamp(11px, 1.1cqw, 22px) Georgia,
    serif;
  letter-spacing: 0.055em;
  pointer-events: none;
}
body:not([data-screen="play"]) #technique {
  display: none;
}

.route .mastery{display:block;font:500 clamp(9px,.65vw,13px)/1.3 system-ui;letter-spacing:.035em;color:#d7bc80;margin-left:auto;padding:0 .8em}.route small{min-width:8.2em;text-align:right}
body[data-finale] #court header,body[data-finale] #court aside,body[data-finale] #court footer,body[data-finale] #court section,body[data-finale] #hold,body[data-finale] #technique{opacity:0}
#bloom-title{position:absolute;bottom:9%;width:100%;text-align:center;color:#fff2cd;text-shadow:0 2px 14px #201909;font:italic clamp(20px,2.15vw,42px)/1.25 Georgia,serif;pointer-events:none}
#renderer-notice{position:fixed;z-index:30;bottom:1.5em;right:2em;max-width:32em;background:#15231eef;color:#f2dfb1;border:1px solid #a48753;padding:.65em 1em;font:14px/1.45 system-ui}

body[data-shell="menu"] #court{background:linear-gradient(90deg,#13271fda,#1a302751),url("./assets/canyon.jpg") center/cover}
body[data-shell="menu"] #court>:is(header,aside,footer,section,#hold,#hint,#technique){display:none}
#bloom-title{z-index:3}
