body.in-menu {
  overflow: hidden;
}
body.in-dialog:not(.in-menu) {
  overflow: hidden;
}
.keycap {
  border: 1px solid #718060;
  padding: 1px 4px;
  margin-left: 4px;
  font: calc(10px * var(--text-scale, 1)) monospace;
}
.main-menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow-y: auto;
  background: radial-gradient(
    ellipse at 80% 35%,
    #303d2c 0,
    #1c2821 45%,
    #17201c 85%
  );
}
.main-menu::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.13;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #050e06 4px
  );
}
.menu-wrap {
  position: relative;
  width: min(1240px, 100%);
  min-height: 100%;
  padding: 28px 40px 20px;
  margin: auto;
  display: flex;
  flex-direction: column;
}
.menu-topline,
.menu-bottomline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: calc(11px * var(--text-scale, 1));
}
.menu-topline {
  border-bottom: 1px solid var(--line);
  padding-bottom: 23px;
}
.menu-topline > span:last-child {
  font: calc(10px * var(--text-scale, 1)) monospace;
  letter-spacing: 1.5px;
}
.menu-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 90px;
  padding: 58px 0 48px;
  flex: 1;
  align-items: center;
}
.menu-edition {
  color: var(--yellow);
  font: 12px monospace;
  letter-spacing: 2px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.menu-edition span {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
#menuTitle {
  font-size: clamp(44px, 4.7vw, 64px);
  line-height: 1.23;
  letter-spacing: -2px;
  font-weight: 600;
  margin: 27px 0 21px;
}
#menuTitle em {
  color: var(--yellow);
  font-style: normal;
}
.title-period {
  color: var(--yellow);
}
.menu-intro {
  color: #b3bda6;
  line-height: 1.95;
  margin: 0 0 29px;
  font-size: calc(14px * var(--text-scale, 1));
}
.menu-actions {
  display: grid;
  gap: 11px;
  max-width: 390px;
}
.menu-button {
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border: 1px solid #59674a;
  color: var(--text);
  background: #29362b;
  box-shadow: 3px 3px 0 #101b14;
}
.menu-button b {
  font-size: calc(16px * var(--text-scale, 1));
  font-weight: 500;
}
.menu-button small {
  display: block;
  color: #a6b19a;
  margin-top: 4px;
  font-size: calc(10px * var(--text-scale, 1));
}
.menu-button.primary {
  background: var(--yellow);
  color: #2b3827;
  border-color: var(--yellow);
}
.menu-button.primary small {
  color: #576041;
}
.menu-button:hover:not(:disabled) {
  background: #44553a;
}
.menu-button.primary:hover:not(:disabled) {
  background: #eee3a0;
}
.menu-button.menu-exit {
  color: #f0d7c4;
  background: #382d29;
  border-color: #8b6259;
}
.menu-button.menu-exit small {
  color: #c99f8e;
}
.menu-button.menu-exit:hover:not(:disabled) {
  color: #fff1e5;
  background: #513832;
  border-color: #bc7d6e;
}
.menu-button:disabled {
  opacity: 0.42;
  box-shadow: none;
}
.menu-arrow {
  font: 25px monospace;
}
.menu-secondary {
  display: flex;
  gap: 12px;
}
.menu-secondary button {
  color: #b3bea4;
  border: 1px solid #43523c;
  background: transparent;
  flex: 1;
  padding: 11px 8px;
  font-size: calc(11px * var(--text-scale, 1));
}
.menu-secondary button:hover {
  color: var(--text);
  background: #33432e;
}
.menu-save-note {
  color: #7f9077;
  font-size: calc(10px * var(--text-scale, 1));
  margin-top: 18px;
}
.menu-camera {
  display: flex;
  justify-content: space-between;
  font-size: calc(10px * var(--text-scale, 1));
  color: #b8c0a4;
  padding: 12px 0;
  border-top: 1px solid #536145;
}
.menu-camera > span:last-child {
  font: calc(10px * var(--text-scale, 1)) monospace;
}
.menu-art-frame {
  border: 1px solid #586748;
  padding: 8px;
  background: #2a3529;
  box-shadow: 8px 9px 0 #142019;
  position: relative;
}
.menu-art-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0,
    transparent 3px,
    #00000015 4px
  );
}
#menuArt {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.menu-art-caption {
  font: calc(8px * var(--text-scale, 1)) monospace;
  color: #a4b093;
  padding: 12px 5px 5px;
  letter-spacing: 1.3px;
}
.hiring-note {
  margin: 27px 10px 0 24px;
  background: #d6d2b6;
  color: #3b4334;
  padding: 22px 25px;
  position: relative;
  transform: rotate(-2deg);
  box-shadow: 5px 5px 0 #142019;
}
.hiring-note::before {
  content: "";
  position: absolute;
  top: -9px;
  width: 85px;
  height: 20px;
  left: calc(50% - 40px);
  background: #a8b091bb;
  transform: rotate(3deg);
}
.hiring-note .eyebrow {
  color: #6e765e;
  font-size: calc(8px * var(--text-scale, 1));
  letter-spacing: 1px;
}
.hiring-note h3 {
  font-size: calc(19px * var(--text-scale, 1));
  line-height: 1.65;
  margin: 12px 0 18px;
  font-weight: 500;
  max-width: 82%;
}
.note-details {
  border-top: 1px solid #a3ab8e;
  padding-top: 12px;
  display: flex;
  gap: 16px;
  font-size: calc(9px * var(--text-scale, 1));
  color: #657152;
}
.note-stamp {
  position: absolute;
  right: 19px;
  top: 41px;
  border: 3px double #9a6953;
  color: #9a6953;
  font-size: calc(14px * var(--text-scale, 1));
  line-height: 1.35;
  text-align: center;
  padding: 6px 10px;
  transform: rotate(12deg);
}
.menu-quote {
  color: #859579;
  font-size: calc(10px * var(--text-scale, 1));
  text-align: center;
  margin-top: 28px;
}
.menu-bottomline {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: calc(9px * var(--text-scale, 1));
}
.menu-bottomline > span:last-child {
  color: #b2ba98;
}
.pause-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.pause-symbol {
  font: 25px monospace;
  color: var(--yellow);
  border: 1px solid #718060;
  padding: 8px 13px;
}
.pause-status {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  color: var(--muted);
  font-size: calc(11px * var(--text-scale, 1));
  gap: 12px;
}
.pause-note {
  font-size: calc(10px * var(--text-scale, 1)) !important;
  margin-bottom: 0;
  text-align: center;
}
@media (max-width: 1000px) {
  .menu-grid {
    gap: 38px;
    padding: 42px 0;
  }
  .menu-wrap {
    padding: 24px 28px;
  }
  .menu-edition {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hiring-note {
    margin-left: 0;
    padding: 20px;
  }
  .hiring-note h3 {
    font-size: calc(16px * var(--text-scale, 1));
    max-width: 75%;
  }
  .note-details {
    gap: 9px;
    font-size: calc(8px * var(--text-scale, 1));
  }
}
@media (max-width: 720px) {
  .menu-wrap {
    padding: 21px 24px;
  }
  .menu-topline {
    font-size: calc(10px * var(--text-scale, 1));
    padding-bottom: 16px;
  }
  .menu-topline > span:last-child {
    font-size: calc(7px * var(--text-scale, 1));
    max-width: 112px;
    line-height: 1.8;
    text-align: right;
  }
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 33px;
    padding: 30px 0;
  }
  #menuTitle {
    font-size: 49px;
    margin: 19px 0 14px;
  }
  .menu-intro {
    font-size: calc(12px * var(--text-scale, 1));
    margin-bottom: 22px;
  }
  .menu-actions {
    max-width: none;
  }
  .menu-button {
    padding: 13px 16px;
  }
  .menu-visual {
    max-width: 480px;
    width: 100%;
    margin: auto;
  }
  .hiring-note {
    display: none;
  }
  .menu-quote {
    font-size: calc(9px * var(--text-scale, 1));
    margin-top: 19px;
  }
  .menu-bottomline {
    align-items: flex-start;
    font-size: calc(8px * var(--text-scale, 1));
    gap: 14px;
  }
  .menu-bottomline span {
    flex: 1;
  }
  .menu-bottomline span:last-child {
    text-align: right;
  }
  .top-tools #helpBtn {
    display: none;
  }
  .keycap {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-button {
    transition: none;
  }
}
.gallery-link {
  background: transparent;
  color: var(--yellow);
  border: 0;
  border-bottom: 1px solid #526145;
  padding: 10px 0;
  font-size: calc(10px * var(--text-scale, 1));
  margin-top: 12px;
  text-align: left;
}
.gallery-link:hover {
  color: var(--text);
  border-color: var(--yellow);
}
.cast-modal {
  width: min(1000px, 100%);
}
.zone-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.zone-nav button {
  font: inherit;
  font-size: calc(12px * var(--text-scale, 1));
  letter-spacing: 0.04em;
  padding: 7px 11px;
  color: #d8e0c8;
  background: #1b241d;
  border: 1px solid #4d5d44;
  cursor: pointer;
}
.zone-nav button:hover,
.zone-nav button:focus-visible {
  border-color: var(--yellow, #d6c26a);
  color: #f2f5e6;
}
.cast-zone {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid #3b4a37;
}
.cast-zone .zone-head h3 {
  margin: 4px 0 6px;
  font-size: calc(15px * var(--text-scale, 1));
}
.cast-zone .zone-head p {
  margin: 0;
  font-size: calc(12px * var(--text-scale, 1));
  line-height: 1.6;
  color: #b7c2a6;
}
.cast-card h3 {
  margin: 8px 0 4px;
  font-size: calc(13px * var(--text-scale, 1));
  line-height: 1.4;
}
.cast-card p {
  margin: 0 0 6px;
  font-size: calc(11px * var(--text-scale, 1));
  line-height: 1.6;
  color: #cfd9bf;
}
.cast-card small {
  display: block;
  font-size: calc(10px * var(--text-scale, 1));
  line-height: 1.5;
  color: #9aa88c;
  word-break: break-word;
}
.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.cast-card {
  min-width: 0;
  background: #1e2a22;
  border: 1px solid #4d5d44;
  padding: 12px;
}
.secret-card {
  border-color: #a89255;
}
.cast-photo {
  position: relative;
  background: #84957a;
  display: flex;
  justify-content: center;
  border: 1px solid #a7b08f;
  overflow: hidden;
}
.cast-photo canvas {
  width: 100px;
  height: 130px;
}
.cast-photo span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #25352bd9;
  font-size: calc(9px * var(--text-scale, 1));
  text-align: center;
  color: #d4d6b6;
  padding: 3px;
}
.cast-card h3 {
  font-weight: 500;
  margin: 10px 0 2px;
  font-size: calc(13px * var(--text-scale, 1));
}
.cast-card p {
  margin: 4px 0;
  font-size: calc(11px * var(--text-scale, 1));
  line-height: 1.7;
}
.cast-card > small {
  color: var(--yellow);
  font-size: calc(9px * var(--text-scale, 1));
}
@media (max-width: 720px) {
  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cast-card {
    padding: 9px;
  }
  .cast-card h3 {
    font-size: calc(11px * var(--text-scale, 1));
  }
  .cast-card p {
    font-size: calc(10px * var(--text-scale, 1));
  }
  .cast-photo canvas {
    width: 90px;
    height: 117px;
  }
}

.menu-panel {
  display: grid;
  gap: 11px;
  max-width: 390px;
}
.menu-panel.hidden {
  display: none;
}
.menu-panel-head .eyebrow {
  color: var(--yellow);
}
.menu-panel-head p {
  margin: 8px 0 4px;
  color: #a6b19a;
  font-size: calc(11px * var(--text-scale, 1));
  line-height: 1.7;
}
.menu-panel-list {
  display: grid;
  gap: 9px;
  margin: 0;
}
.menu-panel .menu-button {
  width: 100%;
}
.menu-locale {
  gap: 14px;
  padding: 12px 16px;
}
.menu-locale .locale-code {
  flex: none;
  padding: 4px 6px;
  border: 1px solid #59674a;
  color: #a6b19a;
  font: calc(10px * var(--text-scale, 1)) "Keel Mono", "Courier New", monospace;
  letter-spacing: 1px;
}
.menu-locale .locale-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.menu-locale .locale-name b {
  font-size: calc(15px * var(--text-scale, 1));
}
.menu-locale .locale-name small {
  margin: 0;
}
.menu-locale i {
  font-style: normal;
  font-size: calc(12px * var(--text-scale, 1));
  color: #a6b19a;
}
.menu-locale[data-current="true"] {
  color: #2b3827;
  background: var(--yellow);
  border-color: var(--yellow);
}
.menu-locale[data-current="true"] small,
.menu-locale[data-current="true"] i,
.menu-locale[data-current="true"] .locale-code {
  color: #576041;
  border-color: #8f8a55;
}
.menu-locale[data-current="true"]:hover:not(:disabled) {
  background: #eee3a0;
}
.menu-panel .audio-settings button[aria-pressed="false"] {
  color: #a6b19a;
  background: #222c22;
}
.menu-volume {
  padding: 12px 16px;
  border: 1px solid #59674a;
  background: #29362b;
  box-shadow: 3px 3px 0 #101b14;
}
.menu-panel-back {
  margin-top: 4px;
}

.menu-settings {
  display: grid;
  gap: 18px;
}
.settings-section {
  display: grid;
  gap: 10px;
}
.settings-section > .eyebrow {
  color: var(--yellow);
}
.settings-list {
  display: grid;
  gap: 9px;
  margin: 0;
}
.settings-volume,
.menu-panel .settings-volume {
  padding: 12px 16px;
  border: 1px solid #59674a;
  background: #29362b;
  box-shadow: 3px 3px 0 #101b14;
}
.text-scale-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.text-scale-option {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  min-height: 74px;
  padding: 8px 4px;
  color: var(--text);
  background: #29362b;
  border: 1px solid #59674a;
  box-shadow: 3px 3px 0 #101b14;
}
.text-scale-option:hover {
  background: #3a4a35;
}
.text-scale-option.active {
  color: #263125;
  background: var(--yellow);
  border-color: var(--yellow);
}
.text-scale-glyph {
  line-height: 1.1;
  font-weight: 600;
}
.text-scale-option b {
  font-size: 11px;
  font-weight: 500;
}
.text-scale-option small {
  font-size: 10px;
  opacity: 0.75;
}
.text-scale-preview {
  margin: 2px 0 0;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border-left: 4px solid var(--yellow);
  font-size: calc(14px * var(--text-scale, 1));
  line-height: 1.7;
}
.settings-note {
  color: #a6b19a;
  font-size: 11px;
  line-height: 1.6;
}
.modal.settings-modal {
  width: min(560px, 100%);
}
.modal.settings-modal .settings-section + .settings-section {
  margin-top: 18px;
}
.modal.settings-modal .audio-settings button {
  text-align: left;
}
.modal .text-scale-preview {
  color: var(--ink);
}

.modal.handbook-modal {
  width: min(1100px, 100%);
  max-height: 96vh;
  padding: 20px 24px 22px;
  overflow: hidden;
  background: #241f1a;
  border-color: #6d5a43;
}
.hb {
  --hb-h: min(64vh, 600px);
  display: grid;
  gap: 14px;
}
.hb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hb-head .eyebrow {
  color: #e6c98a;
}
.hb-close {
  width: 34px;
  height: 34px;
  color: #e6dfc5;
  background: #3a3027;
  border: 1px solid #6d5a43;
  font-size: 20px;
  line-height: 1;
}
.hb-close:hover {
  background: #4a3d31;
}
.hb-book {
  position: relative;
  padding: 12px;
  background:
    repeating-linear-gradient(45deg, #ffffff06 0 2px, transparent 2px 6px),
    linear-gradient(#5a3f2a, #48321f);
  border: 1px solid #2a1d12;
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 2px #6f5034,
    8px 10px 0 #0e0b08;
  perspective: 2400px;
}
.hb-ribbon {
  position: absolute;
  top: -6px;
  right: 22%;
  z-index: 5;
  width: 18px;
  height: 64px;
  background: #a8463a;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 2px 2px 0 #00000055;
}
.hb-pages {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  height: var(--hb-h);
  transform-style: preserve-3d;
}
.hb-is-spread .hb-pages {
  grid-template-columns: 1fr 1fr;
}
.hb-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 26px 30px 14px;
  color: var(--ink);
  background: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #635c3710 4px);
  overflow: hidden;
}
.hb-left {
  background-image:
    linear-gradient(to left, #00000030, transparent 9%),
    repeating-linear-gradient(0deg, transparent 0 3px, #635c3710 4px);
  border-radius: 3px 0 0 3px;
}
.hb-right {
  background-image:
    linear-gradient(to right, #00000030, transparent 9%),
    repeating-linear-gradient(0deg, transparent 0 3px, #635c3710 4px);
  border-radius: 0 3px 3px 0;
}
.hb-single {
  border-radius: 3px;
}
.hb-blank {
  background: #d8d0b2;
}
.hb-page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.hb-measuring {
  position: absolute;
  top: 12px;
  left: 12px;
  height: var(--hb-h);
  visibility: hidden;
  pointer-events: none;
}
.hb-folio {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  color: #8c8259;
  border-top: 1px solid #c9bf98;
  font: calc(10px * var(--text-scale, 1)) monospace;
  letter-spacing: 0.08em;
}
.hb-right .hb-folio {
  flex-direction: row-reverse;
}
.hb-chapter {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px double #4d5646;
}
.hb-chapter span {
  color: #a8463a;
  font: bold calc(13px * var(--text-scale, 1)) monospace;
}
.hb-chapter h3 {
  margin: 0;
  color: #2f4b5e;
  font-size: calc(20px * var(--text-scale, 1));
}
.hb-item {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid #c9bf98;
}
.hb-item b {
  display: block;
  color: #2f3a31;
  font-size: calc(14px * var(--text-scale, 1));
}
.hb-item p {
  margin: 3px 0 0;
  color: #4d5646;
  font-size: calc(12.5px * var(--text-scale, 1));
  line-height: 1.65;
}
.hb-note p {
  color: #3f463b;
}
.hb-keys {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.hb-keys div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: calc(13px * var(--text-scale, 1));
}
.hb-keys kbd {
  min-width: 42px;
  padding: 3px 8px;
  text-align: center;
  color: #3c3a2a;
  background: #f6f0d6;
  border: 2px solid #6d765d;
  border-bottom-width: 4px;
  font: bold calc(12px * var(--text-scale, 1)) monospace;
}
.hb-toc {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.hb-toc button {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 6px 4px;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px dashed #c9bf98;
  font-size: calc(14px * var(--text-scale, 1));
}
.hb-toc button:hover {
  background: #efe7c8;
}
.hb-toc span {
  color: #a8463a;
  font: bold calc(12px * var(--text-scale, 1)) monospace;
}
.hb-toc i {
  flex: 1;
  border-bottom: 2px dotted #b5aa84;
  transform: translateY(-4px);
}
.hb-toc em {
  color: #6d7461;
  font: calc(12px * var(--text-scale, 1)) monospace;
  font-style: normal;
}
.hb-kind-cover .hb-page-body {
  display: grid;
}
.hb-page.hb-kind-cover {
  background:
    radial-gradient(circle at 50% 38%, #f3edd6 0 40%, transparent 70%),
    var(--paper);
}
.hb-page-body > .hb-cover {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 100%;
  text-align: center;
}
.hb-cover-eyebrow {
  color: #8c8259;
  font: 600 11px "Keel Mono", monospace;
  letter-spacing: 0.3em;
}
.hb-emblem {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  color: #a8463a;
  border: 4px double #a8463a;
  border-radius: 50%;
  transform: rotate(-8deg);
}
.hb-emblem span {
  font: 700 34px "Keel Pixel", monospace;
}
.hb-page-body .hb-cover h2 {
  max-width: 360px;
  margin: 6px 0 0;
  color: #2f4b5e;
  font-size: 26px;
  line-height: 1.3;
}
.hb-page-body .hb-cover p {
  max-width: 340px;
  margin: 0;
  color: #4d5646;
  font-size: calc(14px * var(--text-scale, 1));
}
.hb-cover-foot {
  margin-top: 16px;
  padding: 4px 10px;
  color: #6d7461;
  border: 1px solid #b9b191;
  font: calc(10px * var(--text-scale, 1)) monospace;
  letter-spacing: 0.1em;
}
.hb-leaf {
  position: absolute;
  top: 0;
  z-index: 4;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  animation-duration: 0.62s;
  animation-timing-function: cubic-bezier(0.45, 0.05, 0.3, 1);
  animation-fill-mode: forwards;
}
.hb-leaf-next {
  left: 50%;
  transform-origin: left center;
  animation-name: hbTurnNext;
}
.hb-leaf-prev {
  left: 0;
  transform-origin: right center;
  animation-name: hbTurnPrev;
}
.hb-leaf-single {
  left: 0;
  width: 100%;
}
.hb-leaf-single.hb-leaf-next {
  transform-origin: left center;
}
.hb-leaf-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.hb-leaf-face > .hb-page {
  height: 100%;
}
.hb-leaf-back {
  transform: rotateY(180deg);
}
.hb-leaf-single .hb-leaf-back {
  display: none;
}
.hb-leaf-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #00000000, #0000002e);
  pointer-events: none;
  animation: hbShade 0.62s ease-in-out forwards;
}
@keyframes hbTurnNext {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(-180deg);
  }
}
@keyframes hbTurnPrev {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}
@keyframes hbShade {
  50% {
    opacity: 1;
  }
  0%,
  100% {
    opacity: 0;
  }
}
.hb-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}
.hb-nav button {
  padding: 10px 16px;
  color: #2b2418;
  background: #e6c98a;
  border: 1px solid #f1dca9;
  box-shadow: 3px 3px 0 #0e0b08;
  font-size: calc(13px * var(--text-scale, 1));
  font-weight: 600;
}
.hb-nav button:hover:not(:disabled) {
  background: #f1dca9;
}
.hb-nav button:disabled {
  opacity: 0.35;
  box-shadow: none;
}
.hb-meta {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #d8c9a4;
  font: calc(12px * var(--text-scale, 1)) monospace;
}
.hb-progress {
  width: min(320px, 100%);
  height: 5px;
  background: #3a3027;
}
.hb-progress i {
  display: block;
  height: 100%;
  background: #e6c98a;
  transition: width 0.3s ease;
}
.hb-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.hb-foot button {
  padding: 10px 16px;
  color: #e6dfc5;
  background: #3a3027;
  border: 1px solid #6d5a43;
  font-size: calc(13px * var(--text-scale, 1));
}
.hb-foot .primary {
  color: #232f24;
  background: var(--yellow);
  border-color: var(--yellow);
  font-weight: 600;
}
@media (max-width: 760px) {
  .modal.handbook-modal {
    padding: 14px;
  }
  .hb {
    --hb-h: min(62vh, 560px);
  }
  .hb-page {
    padding: 20px 18px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb-leaf {
    display: none;
  }
}
