:root {
  color-scheme: light;
  --paper: #f8f5e9;
  --ink: #292821;
  --muted: #777266;
  --line: #b6afa0;
  --blue: #365d7c;
  --green: #567449;
  --gold: #e8d39a;
  --well: #e9e5d8;
  font-family: Tahoma, Verdana, sans-serif;
  color: var(--ink);
  font-size: 13px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #bfc6c6;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #ffffff14 4px
  );
  min-height: 100vh;
  padding: 26px 24px;
}
button,
input,
select {
  font: inherit;
}
button,
.file-button {
  border: 1px solid #8f9799;
  border-radius: 3px;
  background: linear-gradient(#fffef6, #e1e4df);
  box-shadow:
    inset 0 1px #fff,
    0 1px 1px #0002;
  color: #294859;
  padding: 8px 11px;
  cursor: pointer;
  transition: background 0.12s;
}
button:hover:not(:disabled),
.file-button:hover {
  background: linear-gradient(#fffbed, #e8dcae);
  border-color: #ab9253;
}
button:active:not(:disabled) {
  background: #ddcba2;
  box-shadow: inset 0 1px 3px #0003;
}
button:disabled {
  opacity: 0.68;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible,
.file-button:focus-within {
  outline: 3px solid #5e88a9;
  outline-offset: 2px;
}
button[aria-pressed="true"] {
  background: #e6d29a;
  border-color: #99804b;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: normal;
}
h3 {
  font-family: Georgia, serif;
  font-size: 17px;
}
.game-shell {
  max-width: 1510px;
  margin: auto;
  background: var(--paper);
  border: 1px solid #f7f7ef;
  outline: 1px solid #929a9b;
  box-shadow: 0 12px 34px #24383a38;
  border-radius: 5px;
  overflow: hidden;
}
.masthead {
  padding: 22px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #a6a296;
  background: linear-gradient(#fbf9ef, #ede9dc);
}
.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.sketch-star {
  font-size: 51px;
  transform: rotate(-14deg);
  line-height: 1;
}
h1 {
  font-family: Georgia, serif;
  font-size: 23px;
  letter-spacing: 1.5px;
  font-weight: bold;
  white-space: nowrap;
}
h1 i {
  font-size: 17px;
  font-weight: normal;
}
h1 span {
  display: block;
  font-size: 29px;
  letter-spacing: -0.6px;
  margin-top: 3px;
  transform: rotate(-1deg);
}
.header-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  align-items: center;
}
.edition {
  width: 100%;
  text-align: right;
  font-family: Georgia, serif;
  font-style: italic;
  color: #787568;
  margin-bottom: 4px;
}
.resource-strip {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 13px 24px;
  background: #e4dfce;
  border-bottom: 1px solid #a8a08e;
  min-height: 65px;
}
.resource-strip > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.resource-strip strong {
  font-size: 21px;
  font-family: Georgia, serif;
  font-variant-numeric: tabular-nums;
}
.resource-strip span {
  color: #6b6557;
}
.coin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #dbc28b;
  border: 1px solid #aa8c55;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #f1dba5;
  color: #745322 !important;
  font-size: 22px;
}
.level-stamp {
  font-size: 10px;
  transform: rotate(-6deg);
  border: 1px solid #89806a;
  padding: 3px;
}
.resource-strip .xp-track {
  display: block;
  min-width: 135px;
  flex: 1;
  max-width: 220px;
}
.xp-track span {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}
progress {
  width: 100%;
  height: 9px;
  border: 1px solid #9d9789;
  border-radius: 2px;
  background: #ddd8ca;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #ddd8ca;
}
progress::-webkit-progress-value {
  background: #889c74;
}
progress::-moz-progress-bar {
  background: #889c74;
}
#health-wrap {
  flex-wrap: wrap;
  gap: 4px 9px;
  max-width: 145px;
}
#health-wrap strong {
  font-size: 15px;
}
#health-wrap progress::-webkit-progress-value {
  background: #bb7769;
}
.workspace {
  display: grid;
  grid-template-columns: 195px minmax(300px, 1fr) 250px;
}
.left-rail {
  border-right: 1px solid var(--line);
  padding: 17px 13px;
  background: #eeeade;
}
.right-rail {
  border-left: 1px solid var(--line);
  padding: 17px 16px;
  background: #eeeade;
}
.rail-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid #c8c1af;
  margin-bottom: 13px;
}
.rail-heading span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.zone-list {
  display: grid;
  gap: 4px;
  max-height: 310px;
  overflow-y: auto;
  padding: 2px;
}
.zone-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 9px 7px;
  font-size: 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #4d4d44;
}
.zone-button.current {
  background: #e6d6a6;
  border: 1px solid #b8a66e;
  box-shadow: inset 0 1px #fff7d6;
  color: #3c3727;
}
.zone-button.locked {
  opacity: 0.5;
}
.zone-button .tick {
  color: #587245;
}
.world-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7d7566;
  padding: 12px 6px 3px;
}
.mission-note {
  position: relative;
  margin: 27px 0 10px;
  padding: 19px 11px 14px;
  background: #f9efc9;
  border: 1px solid #d4c598;
  box-shadow: 1px 3px 4px #40392022;
  transform: rotate(-1deg);
}
.tape {
  position: absolute;
  top: -8px;
  left: 45px;
  width: 58px;
  height: 16px;
  background: #dfd6b798;
  transform: rotate(4deg);
}
.mission-note p {
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.45;
  margin: 10px 0;
}
.mission-note #zone-progress-label {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #6f644b;
}
.mission-note button {
  width: 100%;
  margin-top: 5px;
}
.play-area {
  min-width: 0;
  background: #faf8ed;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #bdb7a7;
  color: #777265;
  font-size: 11px;
}
.live-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #59744b;
  border: 1px solid #a4b194;
  border-radius: 2px;
  padding: 3px 6px;
}
.canvas-wrap {
  position: relative;
  background: #f2f0e4;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 960/620;
  touch-action: none;
  cursor: crosshair;
}
.scene-help {
  position: absolute;
  bottom: 11px;
  left: 10px;
  right: 10px;
  text-align: center;
  color: #706c61;
  font-size: 10px;
  pointer-events: none;
  background: #f6f3e6b5;
  padding: 5px;
  border-radius: 2px;
}
.scene-toast {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  max-width: 90%;
  text-align: center;
  background: #fff8dcf0;
  border: 1px solid #bfae7c;
  border-radius: 3px;
  padding: 10px 15px;
  box-shadow: 0 2px 6px #0002;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.scene-toast.visible {
  opacity: 1;
}
.action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 11px;
  border-top: 1px solid #aaa594;
  border-bottom: 1px solid #c5beae;
  background: #e7e4d8;
}
.action-bar button {
  padding: 8px 10px;
  font-size: 12px;
}
.action-bar .primary {
  background: linear-gradient(#64829a, #3e607a);
  color: #fff;
  border-color: #36566d;
  box-shadow: inset 0 1px #9fbbcf;
}
.action-bar label {
  font-size: 11px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
kbd {
  font-size: 9px;
  opacity: 0.65;
  margin-left: 5px;
  font-family: Tahoma, sans-serif;
}
.journal {
  padding: 17px 19px 22px;
  min-height: 178px;
  background: repeating-linear-gradient(
    transparent,
    transparent 23px,
    #d0cbb839 24px
  );
  background-position: 0 6px;
}
.journal-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.journal-heading h2 {
  font-size: 15px;
}
.journal-heading span {
  font-size: 10px;
  color: #918575;
  align-self: center;
}
.journal-line {
  font-family: monospace;
  color: #4d783d;
  font-size: 12px;
  line-height: 24px;
}
.journal-line:first-child {
  color: #3b6430;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 7px;
  font-size: 12px;
}
.stat-line strong {
  font-variant-numeric: tabular-nums;
}
.upgrade {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 9px 9px;
  gap: 8px;
}
.upgrade small {
  display: block;
  font-size: 10px;
  color: #777c79;
  margin-top: 4px;
  line-height: 1.3;
}
.upgrade b {
  white-space: nowrap;
  font-size: 12px;
  color: #756032;
}
.equipment {
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid #c8c1af;
}
.equipped {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
}
.equipped > span {
  font-size: 38px;
  transform: rotate(-25deg);
  font-family: Georgia, serif;
}
.equipped small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.inventory {
  font-size: 11px;
  color: #687459;
  line-height: 1.7;
  margin-top: 10px;
}
.chores-box,
.prestige-box {
  border-top: 1px solid #c8c1af;
  margin-top: 20px;
  padding-top: 15px;
}
.chores-box p,
.prestige-box p {
  font-size: 11px;
  line-height: 1.55;
  margin: 9px 0;
  color: #706b5e;
}
.chores-box label {
  font-size: 10px;
  color: #78715f;
  display: block;
  margin-bottom: 5px;
}
select,
input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #99988a;
  background: #fffdf5;
  border-radius: 3px;
}
.chores-box small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}
.lifetime {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: #857c6a;
  margin-top: 25px;
  padding-top: 13px;
  border-top: 1px solid #c8c1af;
}
.status-bar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 14px;
  background: #d7d8cc;
  border-top: 1px solid #aaa99a;
  color: #707163;
  font-size: 10px;
}
.status-bar span:last-child {
  font-size: 9px;
  letter-spacing: 1px;
}
.cinematic {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #1d211df2;
  color: #f5f0dc;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
}
.cinematic > div {
  max-width: 480px;
}
.cinematic p {
  font-family: Georgia, serif;
  line-height: 1.6;
  font-size: 17px;
  margin: 15px 0 25px;
}
.cinematic #cinematic-kicker {
  font-family: Tahoma, sans-serif;
  letter-spacing: 3px;
  font-size: 10px;
  color: #ceba80;
}
.cinematic h2 {
  font-family: Georgia, serif;
  font-size: 35px;
}
.cinematic button {
  background: #ece2bd;
  color: #49412e;
  padding: 11px 20px;
}
.touch-pad {
  display: none;
  position: absolute;
  left: 12px;
  bottom: 39px;
  text-align: center;
  user-select: none;
}
.touch-pad button {
  width: 38px;
  height: 36px;
  padding: 4px;
  opacity: 0.8;
  touch-action: none;
}
.touch-pad div {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}
dialog {
  width: min(540px, calc(100vw - 32px));
  background: var(--paper);
  border: 1px solid #8a8b7e;
  border-radius: 5px;
  padding: 23px;
  box-shadow: 0 20px 90px #0007;
  color: var(--ink);
}
dialog::backdrop {
  background: #25373777;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.dialog-heading h2 {
  font-size: 25px;
}
.dialog-heading button {
  padding: 2px 9px;
  font-size: 22px;
}
dialog p {
  line-height: 1.6;
  margin: 12px 0 18px;
}
dialog label {
  display: block;
  font-size: 12px;
  margin: 13px 0 6px;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  align-items: center;
}
.dialog-actions .file-button {
  display: inline-block;
  margin: 0;
  padding: 8px 11px;
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
dialog .fine-print {
  font-size: 11px;
  color: #797367;
  border-top: 1px solid #d0c8b6;
  padding-top: 14px;
  margin-bottom: 0;
}
#backup-message {
  color: #537445;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1400px) {
  body {
    padding-top: 40px;
  }
  .workspace {
    grid-template-columns: 205px minmax(400px, 1fr) 265px;
  }
  .masthead {
    padding: 25px 27px;
  }
}
@media (max-width: 1080px) {
  body {
    padding: 12px;
  }
  .workspace {
    grid-template-columns: 165px minmax(300px, 1fr) 215px;
  }
  .right-rail {
    padding: 14px 12px;
  }
  .left-rail {
    padding: 14px 10px;
  }
  .resource-strip {
    gap: 17px;
    padding: 12px 17px;
  }
  h1 span {
    font-size: 25px;
  }
  .sketch-star {
    font-size: 40px;
  }
  .masthead {
    padding: 17px;
  }
  .journal-heading span {
    display: none;
  }
  .edition {
    font-size: 11px;
  }
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .right-rail {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .right-rail > .rail-heading {
    grid-column: 1/-1;
  }
  .equipment,
  .chores-box,
  .prestige-box {
    margin-top: 8px;
  }
  .lifetime {
    grid-column: 1/-1;
  }
  .resource-strip {
    flex-wrap: wrap;
    gap: 11px 22px;
  }
  .header-tools .edition {
    display: none;
  }
  .header-tools {
    max-width: 220px;
  }
  .status-bar span:nth-child(2) {
    display: none;
  }
  #defense-wrap {
    grid-row: span 2;
  }
  .touch-pad {
    display: block;
  }
}
@media (max-width: 560px) {
  body {
    padding: 0;
  }
  .game-shell {
    border-radius: 0;
    border: 0;
  }
  .masthead {
    padding: 15px 12px;
    align-items: flex-start;
    gap: 7px;
  }
  .brand {
    gap: 8px;
  }
  .sketch-star {
    font-size: 31px;
  }
  h1 {
    font-size: 17px;
  }
  h1 i {
    font-size: 13px;
  }
  h1 span {
    font-size: 21px;
    white-space: normal;
  }
  .header-tools {
    max-width: 106px;
    gap: 4px;
  }
  .header-tools button {
    font-size: 10px;
    padding: 5px 7px;
  }
  .resource-strip {
    padding: 10px 12px;
    font-size: 11px;
    gap: 8px 14px;
  }
  .resource-strip strong {
    font-size: 18px;
  }
  .resource-strip .xp-track {
    min-width: 85px;
    max-width: 120px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .left-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 11px;
  }
  .left-rail .rail-heading {
    display: none;
  }
  .zone-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    gap: 4px;
  }
  .zone-button {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .world-label {
    display: none;
  }
  .mission-note {
    margin: 8px 0 1px;
    transform: none;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 12px;
    box-shadow: none;
  }
  .mission-note .tape,
  .mission-note h3,
  .mission-note #objective {
    display: none;
  }
  .mission-note progress {
    width: 75px;
  }
  .mission-note #zone-progress-label {
    margin: 0;
    font-size: 10px;
    flex: 1;
  }
  .mission-note button {
    width: auto;
    margin: 0;
    padding: 5px 8px;
    font-size: 10px;
  }
  canvas {
    aspect-ratio: 1.3;
  }
  .scene-help {
    font-size: 9px;
  }
  .journal {
    padding: 12px 15px;
    min-height: 135px;
  }
  .journal-line {
    font-size: 11px;
    line-height: 21px;
  }
  .journal-heading {
    margin-bottom: 6px;
  }
  .right-rail {
    padding: 12px 15px;
  }
  .status-bar {
    font-size: 9px;
  }
  .status-bar span:last-child {
    display: none;
  }
  .action-bar {
    padding: 8px;
  }
  .action-bar button {
    font-size: 11px;
  }
  .cinematic {
    padding: 20px;
  }
  .cinematic h2 {
    font-size: 27px;
  }
  .cinematic p {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* The play surface keeps its controls in view on ordinary laptop screens. */
@media (min-width: 851px) {
  body {
    padding: 12px 18px;
  }
  .masthead {
    padding: 12px 20px 11px;
  }
  .brand {
    gap: 12px;
  }
  .sketch-star {
    font-size: 40px;
  }
  h1 {
    font-size: 20px;
  }
  h1 span {
    font-size: 25px;
    margin-top: 1px;
  }
  .edition {
    font-size: 11px;
    margin-bottom: 1px;
  }
  .resource-strip {
    min-height: 52px;
    padding: 8px 20px;
  }
  .canvas-wrap canvas {
    height: clamp(290px, calc(100dvh - 330px), 570px);
    aspect-ratio: auto;
  }
  .journal {
    padding: 11px 17px 13px;
    min-height: 124px;
  }
  .journal-heading {
    margin-bottom: 7px;
  }
  .journal-line {
    line-height: 21px;
  }
  .left-rail,
  .right-rail {
    padding-top: 12px;
  }
  .rail-heading {
    padding-bottom: 10px;
    margin-bottom: 8px;
  }
  .upgrade small {
    font-size: 11px;
  }
  .zone-list {
    max-height: 270px;
  }
}
.action-bar .primary:hover:not(:disabled) {
  background: linear-gradient(#7193ac, #4b708b);
  color: #fff;
  border-color: #36566d;
}
.action-bar .primary:active:not(:disabled) {
  background: #365a74;
  color: #fff;
}
.weapon-icon {
  width: 29px;
  height: 48px;
  object-fit: contain;
  transform: rotate(-15deg);
}
.cinematic {
  background: transparent;
  justify-items: start;
  text-align: left;
  padding: 20px;
}
.cinematic > div {
  width: 49%;
  max-width: none;
}
.cinematic h2 {
  font-size: clamp(22px, 2.5vw, 36px);
}
.cinematic p {
  font-size: 14px;
  line-height: 1.5;
  margin: 11px 0 18px;
}
.cinematic #cinematic-kicker {
  font-size: 9px;
  letter-spacing: 1.5px;
}
.cinematic.ordinary {
  color: #454135;
}
.cinematic.ordinary #cinematic-kicker {
  color: #857247;
}
@media (max-width: 560px) {
  .cinematic {
    padding: 13px;
  }
  .cinematic p {
    font-size: 11px;
  }
  .cinematic h2 {
    font-size: 23px;
  }
  .cinematic button {
    font-size: 11px;
    padding: 7px 10px;
  }
}
.zone-button .sealed {
  display: block;
  font-size: 9px;
  margin-top: 3px;
  color: #87715d;
}
.canvas-wrap:has(.cinematic:not([hidden])) .scene-help {
  display: none;
}

/* The ledger is a working notebook, with the same paper and controls as play. */
.header-tools {
  flex-wrap: wrap;
}
#collection-count {
  font:
    10px Tahoma,
    sans-serif;
  margin-left: 5px;
}
.tracked-deed {
  margin: 12px;
  padding: 13px;
  border-top: 1px dashed #afa58d;
}
.tracked-deed h3 {
  font:
    bold 15px Georgia,
    serif;
  margin: 0 0 8px;
}
.tracked-deed p {
  font:
    12px/1.5 Georgia,
    serif;
  overflow-wrap: anywhere;
}
.tracked-deed progress {
  width: 100%;
  margin: 6px 0 10px;
}
.tracked-deed button {
  width: 100%;
}
.mechanic-note,
.expedition-note {
  padding: 8px 12px;
  font:
    12px/1.5 Tahoma,
    sans-serif;
  background: #eee4cb;
  border-top: 1px solid #c4b995;
}
.expedition-note {
  background: #e1e9d3;
  color: #455a30;
}
.ledger-dialog {
  width: min(1040px, 95vw);
  max-width: 95vw;
  padding: 22px;
}
.ledger-dialog .dialog-heading {
  align-items: center;
  gap: 12px;
}
.ledger-dialog .dialog-heading h2 {
  font-size: 25px;
}
.ledger-controls {
  display: flex;
  gap: 14px;
  margin: 18px 0 10px;
}
.ledger-controls label {
  flex: 1;
  margin: 0;
}
.ledger-controls input,
.ledger-controls select {
  width: 100%;
  margin-top: 6px;
  min-height: 36px;
}
.ledger-summary {
  border-bottom: 1px solid #b9b09c;
  padding: 8px 0 14px;
  font-size: 12px;
}
.ledger-columns {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.3fr);
  min-height: 300px;
  max-height: 58vh;
}
.quest-list {
  overflow: auto;
  padding: 12px 12px 12px 0;
  border-right: 1px solid #cfc6b3;
}
.quest-list button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  padding: 10px;
  white-space: normal;
  line-height: 1.4;
}
.quest-list button[aria-pressed="true"] {
  background: linear-gradient(#fbefbf, #ded1a5);
  border-color: #a88b48;
}
.quest-list small {
  display: block;
  color: #6e705c;
  margin-top: 3px;
}
.quest-detail {
  overflow: auto;
  padding: 16px 0 16px 22px;
  overflow-wrap: anywhere;
}
.quest-detail h3 {
  margin: 0 0 12px;
  font:
    24px/1.15 Georgia,
    serif;
}
.quest-detail p {
  margin: 8px 0;
}
.quest-detail ol {
  padding-left: 23px;
}
.quest-detail li {
  padding: 8px 0;
  font:
    13px/1.5 Georgia,
    serif;
}
.quest-detail li.finished {
  color: #6b8054;
}
.quest-detail li.current {
  font-weight: bold;
}
.quest-detail small {
  display: block;
  font:
    12px/1.5 Tahoma,
    sans-serif;
  color: #716854;
}
.quest-detail progress {
  width: 100%;
}
.quest-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.quest-reward {
  background: #ebe4d0;
  padding: 10px;
  font:
    12px/1.5 Tahoma,
    sans-serif;
}
.quest-flavor {
  color: #597741;
  font: 12px/1.6 monospace;
}
.quest-empty {
  padding: 20px;
  font:
    14px/1.5 Georgia,
    serif;
}
#ledger-message {
  min-height: 1.4em;
  color: #596c3f;
}
@media (max-width: 560px) {
  .tracked-deed {
    display: none;
  }
  .ledger-dialog {
    padding: 14px;
  }
  .ledger-dialog .dialog-heading h2 {
    font-size: 21px;
  }
  .ledger-controls {
    flex-direction: column;
  }
  .ledger-columns {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .quest-list {
    max-height: 180px;
    border-right: 0;
    border-bottom: 1px solid #cfc6b3;
    padding-right: 0;
  }
  .quest-detail {
    padding-left: 0;
    overflow: visible;
  }
}

#level-title {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Public release: a field manual, clear pauses, and comfortable touch targets. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px 0;
  font-size: 11px;
  color: #736e60;
  background: #fbf9ef;
}
.site-nav a {
  color: #365d7c;
  text-underline-offset: 3px;
}
.site-nav a:hover {
  color: #7b5524;
}
.site-nav a:focus-visible {
  outline: 2px solid #5e88a9;
  outline-offset: 3px;
}
.skip-game {
  position: absolute;
  top: -70px;
  left: 20px;
  z-index: 5;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
}
.skip-game:focus {
  top: 8px;
}
.script-note {
  padding: 20px;
  line-height: 1.6;
}
.brand {
  min-width: 0;
}
h1 {
  white-space: normal;
}
h1 span {
  overflow-wrap: anywhere;
}
.pause-indicator {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: #f8f5e9b8;
  pointer-events: none;
  color: #484739;
}
.pause-indicator strong {
  font:
    italic 30px Georgia,
    serif;
}
.pause-indicator span {
  font-size: 12px;
}
.controls-list {
  margin: 18px 0;
}
.controls-list > div {
  display: grid;
  grid-template-columns: 82px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid #d8d0bf;
  line-height: 1.6;
}
.controls-list dt {
  font-weight: bold;
  color: #526b44;
}
.controls-list dd {
  margin: 0;
}
.controls-list kbd {
  font:
    12px Tahoma,
    sans-serif;
  background: #e7e0cd;
  padding: 2px 4px;
  border-radius: 2px;
}
.manual-note {
  color: #686452;
  font-size: 12px;
}
.dialog-actions button,
.dialog-actions .file-button {
  min-height: 40px;
}
@media (pointer: coarse) {
  .touch-pad {
    display: block;
  }
  .touch-pad button {
    width: 44px;
    height: 44px;
  }
  .action-bar button,
  .zone-button,
  .header-tools button {
    min-height: 44px;
  }
}
@media (min-width: 851px) {
  .canvas-wrap canvas {
    height: clamp(290px, calc(100dvh - 352px), 570px);
  }
}
@media (max-width: 560px) {
  .site-nav {
    padding: 9px 12px 0;
  }
  .masthead {
    flex-wrap: wrap;
  }
  .brand {
    width: 100%;
  }
  .header-tools {
    max-width: none;
    justify-content: flex-start;
    gap: 5px;
  }
  .header-tools button {
    font-size: 11px;
    min-height: 34px;
    padding: 7px 9px;
  }
  .scene-heading {
    gap: 8px;
    line-height: 1.4;
  }
  .live-label {
    flex-shrink: 0;
  }
  .scene-help {
    font-size: 10px;
  }
  .controls-list > div {
    grid-template-columns: 68px 1fr;
  }
}

@media (max-width: 850px) {
  .touch-pad button {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 560px) {
  .equipment,
  .chores-box,
  .prestige-box {
    grid-column: 1 / -1;
  }
}
/* Training belongs to experience; equipment belongs to the penny ledger. */
.training-wallet {
  white-space: nowrap;
}
.xp-token {
  font-family: Georgia, serif;
  font-size: 12px;
  color: #486c82 !important;
  border: 1px solid #8aabb9;
  border-radius: 3px;
  padding: 5px 4px;
  background: #d8e5e8;
}
.resource-strip .training-wallet strong {
  color: #365d75;
}
.resource-strip .training-wallet > span:last-child {
  font-size: 11px;
}
.notebook-button {
  width: 100%;
  margin-top: 9px;
  text-align: left;
  font-size: 12px;
}
.gear-loadout {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  font-size: 11px;
  color: #726a57;
  line-height: 1.5;
}
.gear-loadout b {
  font-weight: normal;
  color: #454b40;
}
.progression-dialog {
  width: min(850px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  padding: 23px 25px;
  overflow-y: auto;
}
.progression-purse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 23px;
  padding: 11px 13px;
  background: #e6e0ce;
  border: 1px solid #c3b99f;
  border-radius: 3px;
  font-size: 12px;
}
.progression-purse strong {
  font-size: 19px;
  font-family: Georgia, serif;
  color: #3d6174;
}
.progression-purse > span:nth-child(2) strong {
  color: #86672e;
}
.progression-purse > span:last-child {
  font-size: 11px;
  color: #797160;
  margin-left: auto;
}
.progression-tabs {
  display: flex;
  gap: 4px;
  margin: 17px 0 0;
  border-bottom: 1px solid #aaa591;
}
.progression-tabs button {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 10px 18px;
  min-width: 170px;
}
.progression-tabs button[aria-selected="true"] {
  background: #eee0b8;
  border-color: #afa06d;
  box-shadow: inset 0 1px #fff4cc;
  color: #4e462d;
}
.progression-tabs small {
  font-size: 10px;
  display: block;
  color: #797462;
  margin-top: 3px;
}
.progression-dialog .progression-explainer {
  font-size: 12px;
  line-height: 1.6;
  color: #726c5c;
  margin: 13px 0 18px;
}
.progression-dialog h3 {
  font-size: 19px;
  font-weight: normal;
  margin: 20px 0 11px;
}
.progression-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.progression-card {
  background: #f1eddf;
  border: 1px solid #d1c8b1;
  border-radius: 3px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.progression-card.unavailable {
  background: #eae6da;
}
.progression-card.owned {
  border-color: #a7b397;
}
.progression-card.equipped {
  display: flex;
  margin: 0;
  border-color: #a29464;
  background: #f0e6c8;
  gap: 8px;
}
.progression-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
}
.progression-card h4 {
  font:
    16px Georgia,
    serif;
  margin: 0;
  color: #383d32;
}
.progression-card .rank-label {
  font-size: 10px;
  color: #867757;
  white-space: nowrap;
}
.progression-card .effect-copy {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  color: #506244;
}
.progression-card .flavor-copy {
  font:
    italic 12px Georgia,
    serif;
  color: #7b7262;
  line-height: 1.45;
  margin: 0;
}
.progression-card .requirement-copy {
  font-size: 11px;
  line-height: 1.5;
  color: #87734e;
  margin: 0;
}
.progression-card .step-comparison {
  font-size: 12px;
  color: #3c596c;
  line-height: 1.6;
  margin: 0;
}
.progression-card .step-comparison b {
  font-weight: normal;
  color: #323c40;
}
.progression-card .gear-badge {
  font-size: 10px;
  color: #6f725d;
  white-space: nowrap;
}
.progression-card button {
  align-self: stretch;
  margin-top: auto;
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
}
.progression-card button small {
  float: right;
  font-size: 11px;
  line-height: 16px;
}
.notebook-loadout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  background: #eae3d0;
  padding: 10px 12px;
  border-bottom: 1px solid #c9bd9e;
  font-size: 11px;
  color: #756b53;
}
.notebook-loadout strong {
  font-weight: normal;
  color: #3d463a;
}
.gear-filter-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0 !important;
  font-size: 12px;
}
.gear-filter-label select {
  max-width: 240px;
}
.progression-dialog .progression-message {
  font-size: 12px;
  color: #456b45;
  margin: 15px 0 0;
  min-height: 19px;
}
.empty-gear {
  grid-column: 1/-1;
  font:
    italic 14px Georgia,
    serif;
  color: #80745f;
  padding: 20px 0;
}
.upgrade b {
  font-variant-numeric: tabular-nums;
}
.upgrade small.training-comparison {
  color: #4e6f7d;
}
.progression-explainer strong {
  font-weight: normal;
  color: #485c3d;
}
@media (min-width: 851px) {
  .resource-strip {
    gap: 12px 20px;
    flex-wrap: wrap;
  }
  .resource-strip .xp-track {
    min-width: 120px;
    max-width: 180px;
  }
  .resource-strip .training-wallet {
    gap: 6px;
  }
}
@media (max-width: 600px) {
  .progression-dialog {
    padding: 17px 14px;
  }
  .progression-grid {
    grid-template-columns: 1fr;
  }
  .progression-tabs button {
    min-width: 0;
    flex: 1;
    padding: 10px;
  }
  .progression-purse {
    gap: 8px 15px;
  }
  .progression-purse > span:last-child {
    width: 100%;
    margin: 0;
  }
  .resource-strip .training-wallet > span:last-child {
    font-size: 10px;
  }
  .progression-card {
    padding: 12px;
  }
  .progression-dialog .dialog-heading h2 {
    font-size: 21px;
  }
}
.retraining {
  margin-top: 20px;
  border-top: 1px solid #c7bea7;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.retraining p {
  font-size: 11px;
  line-height: 1.6;
  color: #79715e;
  flex: 1;
  margin: 0;
}
.retraining button {
  white-space: nowrap;
  font-size: 11px;
}
@media (max-width: 600px) {
  .retraining {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
}
.retrain-confirmation {
  margin-top: 12px;
  padding: 13px;
  background: #efe3bb;
  border: 1px solid #b9a774;
  border-radius: 3px;
}
.retrain-confirmation p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: #61522d;
}
.retrain-confirmation > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.progression-card:focus {
  outline: 2px solid #62899e;
  outline-offset: 2px;
}

/* Field equipment and the player's chosen technique stay visible while adventuring. */
.music-volume { display:inline-flex; align-items:center; gap:4px; font:10px Tahoma,sans-serif; color:var(--muted,#68685d); }
.music-volume input { width:62px; accent-color:#8a9278; }
#weapon-art { display:block; flex:0 0 54px; width:54px; }
#weapon-art svg { display:block; width:100%;height:auto; }
.handling-readout {font:11px/1.5 Tahoma,sans-serif;color:#646052;border-bottom:1px solid #c8c2ac;padding-bottom:9px;}
.relic-status {border:1px solid #bfa75c;background:#eee4bf;padding:9px;margin:10px 0;font:11px/1.5 Tahoma,sans-serif;}
.relic-status strong {font-family:Georgia,serif;font-size:13px;}
.relic-status p {margin:5px 0 0;}
.relic-active {background:#f1dc98;border-color:#9c772a;}
.equipment-card-art {float:right;width:72px;height:72px;margin:0 0 7px 9px;}
.gear-loadout svg {vertical-align:middle;margin-right:5px;}
.mastery-active {border-color:#a18847;background:#f1e9ca;}
@media(max-width:700px){.music-volume input{width:50px}.music-volume{font-size:9px}.header-tools{flex-wrap:wrap}.equipment-card-art{width:58px;height:58px}}
