:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --ink: #243c32;
  --muted: #657168;
  --line: #dcded0;
  --accent: #923e38;
  --soft: #ebece1;
  --white: #fdfcf7;
  --serif: Georgia,'Times New Roman',serif;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: .55;
}
button:focus-visible,a:focus-visible,summary:focus-visible {
  outline: 3px solid #a95b34;
  outline-offset: 4px;
}
button,a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
}
[hidden] {
  display: none!important;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  min-height: 104px;
  padding: 24px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0;
  letter-spacing: 2.5px;
  font-size: 12px;
}
.brand b {
  font-weight: 400;
  display: block;
  font-size: 10px;
  letter-spacing: 3.4px;
  margin-top: 3px;
}
.brand-mark {
  font: 30px var(--serif);
  letter-spacing: -5px;
  width: 43px;
  height: 43px;
  border: 1px solid var(--ink);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: 5px;
}
.brand-mark span {
  font-size: 25px;
  transform: translateY(6px);
}
nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-button {
  min-height: 44px;
  border: 0;
  background: none;
  font-size: 12px;
  padding: 12px 0;
}
.sheet-button {
  border: 1px solid var(--line);
  padding: 12px 18px;
}
.sheet-button span {
  margin-left: 12px;
}
.nav-button:hover,.site-footer button:hover {
  color: var(--accent);
}
main {
  min-height: calc(100vh - 210px);
}
.initial-loading {
  padding: 150px 24px;
  text-align: center;
  font: 26px var(--serif);
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 14px;
}
.skip-link:focus {
  top: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.3px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow:before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}
.landing {
  max-width: 1210px;
  margin: auto;
  padding: 74px 38px 68px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.landing h1 {
  font: clamp(48px,5.1vw,76px)/1.04 var(--serif);
  letter-spacing: -2.7px;
  font-weight: 400;
  margin: 27px 0 22px;
}
.landing h1 em {
  color: var(--accent);
  font-weight: 400;
}
.byline {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 27px;
}
.landing-description {
  font: 18px/1.75 var(--serif);
  max-width: 400px;
  margin: 0 0 26px;
  color: #4f6053;
}
.book-tags {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  padding: 0 0 30px;
}
.book-tags span+span:before {
  content: '·';
  margin-right: 20px;
}
.primary {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  padding: 17px 24px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  font-size: 13px;
}
.primary:hover {
  background: #365445;
}
.primary .arrow {
  font-size: 20px;
  font-weight: 300;
}
.landing-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.text-button {
  min-height: 44px;
  border: 0;
  background: none;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 5px;
  padding: 14px 0;
  color: var(--muted);
}
.save-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 18px;
  max-width: 380px;
}
.save-note .dot {
  color: #6e8652;
  margin-right: 6px;
}
.cover-wrap {
  position: relative;
  padding: 12px 12px 0 0;
  max-width: 420px;
  justify-self: end;
  width: 100%;
}
.cover-wrap:before {
  content: '';
  position: absolute;
  inset: 0 0 12px 12px;
  border: 1px solid #b9c1ae;
}
.cover {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 600/760;
  object-fit: cover;
  box-shadow: 0 18px 45px #20372920;
}
.cover-caption {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 0 0;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted);
  text-transform: uppercase;
}
.cover-caption span:last-child {
  color: var(--accent);
}
.site-footer {
  max-width: 1440px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 24px 5%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.site-footer button {
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reader-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 28px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.back-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 10px 0;
  font-size: 11px;
}
.back-button span {
  margin-right: 12px;
}
.save-status {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.save-status:before {
  content: '';
  width: 5px;
  height: 5px;
  background: #78925e;
  border-radius: 50%;
}
.save-status.error:before {
  background: var(--accent);
}
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0,700px) 260px;
  gap: 66px;
  max-width: 1120px;
  padding: 8px 28px 70px;
  margin: auto;
  align-items: start;
}
.chapter-heading {
  margin-bottom: 28px;
}
.chapter-heading h1 {
  font: 38px/1.2 var(--serif);
  font-weight: 400;
  letter-spacing: -.7px;
  margin: 17px 0 9px;
}
.chapter-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.story {
  font: 18px/1.85 var(--serif);
  color: #35483c;
  overflow-wrap: break-word;
}
.story p {
  margin: 0 0 22px;
}
.story details {
  font: 15px/1.8 var(--serif);
  border-block: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 25px;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
.story details p:first-of-type {
  margin-top: 18px;
}
.choices {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 23px;
}
.choices h2 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 600;
}
.choice {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 17px 18px;
  width: 100%;
  margin: 0 0 10px;
  min-height: 58px;
  font-size: 13px;
  line-height: 1.6;
  transition: border-color .15s,background .15s;
}
.choice:hover {
  border-color: #86917c;
  background: #eff0e7;
}
.choice-index {
  font: 16px var(--serif);
  color: #89917e;
  min-width: 19px;
}
.choice-label {
  flex: 1;
}
.choice-arrow {
  font-size: 18px;
  color: var(--muted);
}
.sidebar {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line);
  background: #eeeee5;
  padding: 25px 21px;
}
.portrait {
  width: 42px;
  height: 42px;
  border: 1px solid #b7c1ad;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 23px var(--serif);
  background: #e2e7d8;
  float: left;
  margin-right: 13px;
}
.character-name {
  font: 21px var(--serif);
  margin: 0 0 4px;
  font-weight: 400;
}
.character-role {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.character-header {
  min-height: 46px;
  margin-bottom: 25px;
}
.health-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 9px;
  color: var(--muted);
}
.health-label strong {
  color: var(--ink);
  font-weight: 500;
}
progress {
  appearance: none;
  border: 0;
  display: block;
  width: 100%;
  height: 5px;
  background: #d6ddca;
}
progress::-webkit-progress-bar {
  background: #d6ddca;
}
progress::-webkit-progress-value {
  background: #5b7355;
}
progress::-moz-progress-bar {
  background: #5b7355;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px 6px;
  margin: 24px 0;
}
.stat {
  text-align: center;
  min-width: 0;
}
.stat dt {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.stat dd {
  font: 21px var(--serif);
  margin: 0;
}
.gold-row {
  border-block: 1px solid #d4d9c9;
  padding: 14px 0;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gold-row strong {
  font: 19px var(--serif);
}
.sidebar h3 {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 23px;
}
.inventory-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
  color: #4c6050;
}
.inventory-list li {
  padding: 5px 0;
  border-bottom: 1px solid #d4d9c966;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.inventory-list .qty {
  font-size: 10px;
  color: var(--muted);
}
.sidebar .text-button {
  min-height: 44px;
  font-size: 10px;
  margin-top: 8px;
}
.interaction {
  background: #eaece1;
  border: 1px solid #d2dac7;
  padding: 22px 24px;
  margin: 25px 0;
}
.interaction h2 {
  font: 22px/1.3 var(--serif);
  margin: 0 0 12px;
  font-weight: 400;
}
.interaction p {
  font-size: 12px;
  line-height: 1.8;
  margin: 6px 0;
  color: #54694f;
}
.interaction.combat {
  border-color: #d9b9aa;
  background: #f0e8dc;
}
.interaction.combat h2 {
  color: var(--accent);
}
.result {
  border-left: 2px solid #b6bfa7;
  padding: 2px 0 2px 17px;
  margin: 24px 0;
}
.result p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 6px 0;
}
.setup-layout {
  max-width: 1030px;
  margin: 0 auto;
  padding: 25px 28px 75px;
  display: grid;
  grid-template-columns: minmax(0,660px) 250px;
  gap: 65px;
  align-items: start;
}
.setup-layout h1 {
  font: 42px/1.15 var(--serif);
  letter-spacing: -1px;
  font-weight: 400;
  margin: 17px 0;
}
.setup-description {
  font: 17px/1.8 var(--serif);
  color: var(--muted);
  margin: 0 0 25px;
}
.equipment-counter {
  font-size: 11px;
  color: var(--accent);
  margin: 22px 0;
}
.equipment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.equipment-options .choice {
  margin: 0;
  font-size: 12px;
  padding: 13px 15px;
}
.equipment-options .choice-index {
  font-family: system-ui;
  font-size: 19px;
}
.setup-layout .sidebar {
  margin-top: 20px;
}
.ending {
  border: 1px solid var(--line);
  padding: 24px;
  margin-top: 30px;
}
.ending h2 {
  font: 27px var(--serif);
  font-weight: 400;
  margin: 0 0 12px;
}
.ending p {
  font: 16px/1.7 var(--serif);
  color: var(--muted);
}
.ending .primary {
  margin-top: 8px;
}
.toast {
  position: fixed;
  z-index: 5;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(540px,calc(100% - 30px));
  padding: 14px 20px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 5px 24px #0002;
}
.toast button {
  background: transparent;
  border: 0;
  color: white;
  text-decoration: underline;
  margin-left: 10px;
  padding: 6px;
}
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 28px;
  width: min(580px,calc(100% - 28px));
  max-height: 85dvh;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #15291ed0;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 19px;
  margin-bottom: 24px;
}
.dialog-header h2 {
  font: 27px var(--serif);
  font-weight: 400;
  margin: 0;
}
.close-button {
  border: 0;
  background: transparent;
  font-size: 28px;
  width: 44px;
  height: 44px;
  flex: none;
}
.dialog-intro {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 22px;
}
.dialog-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 22px 10px;
  margin-bottom: 30px;
}
.inventory-actions {
  margin-top: 24px;
}
.inventory-actions h3 {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin: 25px 0 13px;
}
.inventory-actions .choice {
  font-size: 12px;
  min-height: 46px;
  padding: 11px 14px;
}
.inventory-actions details {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}
.inventory-actions details .choice {
  color: var(--accent);
}
.rules-content {
  font: 15px/1.85 var(--serif);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.rules-content h3 {
  font: 22px var(--serif);
  font-weight: 400;
  margin: 28px 0 12px;
}
.rules-content details {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.journey {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.journey h3 {
  font: 20px var(--serif);
  font-weight: 400;
  margin: 0 0 7px;
}
.journey p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.journey button {
  background: none;
  border: 1px solid var(--line);
  font-size: 11px;
  padding: 13px;
  min-height: 44px;
}
.journeys-new {
  margin-top: 25px;
}
.loading-dots {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: .3;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    animation: none!important;
    transition: none!important;
  }
}
@media(min-width:1450px) {
  .landing {
    padding-block: 95px;
  }
}
@media(max-width:950px) {
  .landing {
    gap: 40px;
    padding-inline: 36px;
  }
  .landing h1 {
    font-size: 56px;
  }
  .reader-layout {
    gap: 32px;
    grid-template-columns: minmax(0,1fr) 225px;
  }
  .setup-layout {
    gap: 32px;
    grid-template-columns: minmax(0,1fr) 225px;
  }
  .sidebar {
    padding: 22px 17px;
  }
}
@media(max-width:700px) {
  .site-header {
    min-height: 82px;
    padding: 18px 22px;
    gap: 14px;
  }
  .brand {
    gap: 9px;
    font-size: 10px;
    letter-spacing: 1.4px;
  }
  .brand b {
    font-size: 8px;
    letter-spacing: 2.2px;
  }
  .brand-mark {
    width: 33px;
    height: 36px;
    font-size: 24px;
  }
  .brand-mark span {
    font-size: 20px;
  }
  nav {
    gap: 14px;
  }
  .nav-button {
    min-height: 44px;
    font-size: 10px;
  }
  .sheet-button {
    padding: 11px 12px;
  }
  .sheet-button span {
    margin-left: 5px;
  }
  #journeys-button {
    display: none;
  }
  .landing {
    padding: 35px 26px 43px;
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .landing h1 {
    font-size: 58px;
    letter-spacing: -2.4px;
    margin-top: 22px;
  }
  .landing-description {
    font-size: 17px;
    line-height: 1.75;
    max-width: none;
  }
  .byline {
    margin-bottom: 21px;
  }
  .book-tags {
    padding-bottom: 24px;
    gap: 14px;
  }
  .book-tags span+span:before {
    margin-right: 14px;
  }
  .landing-buttons {
    gap: 17px;
  }
  .primary {
    padding: 16px 21px;
    font-size: 12px;
    min-height: 53px;
  }
  .save-note {
    margin-top: 17px;
    font-size: 10px;
  }
  .cover-wrap {
    justify-self: center;
    max-width: 370px;
  }
  .cover-caption {
    font-size: 8px;
  }
  .site-footer {
    padding: 23px 24px;
    flex-direction: column;
    gap: 6px;
    font-size: 9px;
  }
  .reader-top {
    padding: 17px 24px 18px;
  }
  .reader-layout,.setup-layout {
    display: block;
    padding: 6px 24px 45px;
  }
  .reader-layout>.sidebar,.setup-layout>.sidebar {
    display: none;
  }
  .chapter-heading h1 {
    font-size: 34px;
    margin-top: 15px;
  }
  .chapter-heading {
    margin-bottom: 25px;
  }
  .story {
    font-size: 17px;
    line-height: 1.85;
  }
  .choice {
    font-size: 12px;
    gap: 12px;
    padding: 16px;
  }
  .choices {
    margin-top: 26px;
  }
  .setup-layout h1 {
    font-size: 38px;
  }
  .setup-description {
    font-size: 16px;
  }
  .equipment-options {
    gap: 8px;
  }
  .equipment-options .choice {
    font-size: 11px;
    padding: 12px;
    gap: 8px;
  }
  .equipment-options .choice-index {
    font-size: 17px;
    min-width: 12px;
  }
  .equipment-options .choice-arrow {
    display: none;
  }
  .interaction {
    padding: 19px;
  }
  .toast {
    bottom: 15px;
  }
  dialog {
    padding: 21px;
  }
  .dialog-header h2 {
    font-size: 25px;
  }
  .dialog-stats {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
