:root {
  --ink: #f1eddf;
  --muted: #bbbfb0;
  --gold: #d8c18a;
  --green: #20352a;
  --panel: rgba(25, 40, 32, 0.88);
  --line: rgba(215, 213, 183, 0.18);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --border: 1px solid var(--line);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  background: #263c30;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button,
a,
input,
select {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
}
button {
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s,
    border-color 0.2s;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}
svg.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
#game,
#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world {
  outline: none;
  touch-action: none;
  cursor: grab;
}
#world:active {
  cursor: grabbing;
}
.world-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(15, 31, 25, 0.8),
      transparent 27%,
      transparent 63%,
      rgba(14, 29, 22, 0.92)
    ),
    linear-gradient(
      90deg,
      rgba(12, 29, 22, 0.3),
      transparent 27%,
      transparent 75%,
      rgba(12, 29, 22, 0.26)
    );
}
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: var(--border);
  background: linear-gradient(#1e332a7a, #1e332a18);
  z-index: 3;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 240px;
}
.brand-crest {
  display: grid;
  place-items: center;
  border: 1px solid #bfa97180;
  width: 43px;
  height: 49px;
  border-radius: 3px 3px 18px 18px;
  color: var(--gold);
}
.brand-crest svg {
  width: 29px;
  height: 33px;
}
.brand small {
  font-size: 8px;
  letter-spacing: 3px;
  display: block;
  color: #d8d8be;
  margin-bottom: 3px;
}
.brand strong {
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: 5px;
  line-height: 1;
  font-weight: 600;
}
.brand-flourish {
  font-size: 17px;
  margin-left: 9px;
  color: var(--gold);
}
.topbar nav {
  display: flex;
  gap: 35px;
  align-self: stretch;
  align-items: stretch;
}
.nav-link {
  font-size: 12px;
  color: #cbd0bd;
  padding: 0 4px;
  position: relative;
}
.nav-link:hover,
.nav-link.selected {
  color: var(--ink);
}
.nav-link.selected:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  left: 0;
  right: 0;
}
.top-actions {
  min-width: 240px;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  align-items: center;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: #d8ddc7;
  border-radius: 50%;
}
.icon-button:hover {
  background: #e8e3bf17;
  color: #fff;
}
.save-status {
  font-size: 10px;
  letter-spacing: 0.2px;
  color: #c4c6ac;
  display: flex;
  align-items: center;
  gap: 7px;
}
.save-status:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b1c4a5;
}
.save-status.error {
  color: #e9bc9f;
}
.save-status.error:before {
  background: #e9bc9f;
}
.place-heading {
  position: absolute;
  top: 120px;
  left: calc(50% - 180px);
  width: 360px;
  text-align: center;
  pointer-events: none;
}
.eyebrow {
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 1.7px;
  color: #cbcbb4;
}
.place-heading .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 8px;
  letter-spacing: 2.2px;
}
.place-heading .eyebrow i {
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
}
.place-heading h1 {
  font-size: 49px;
  line-height: 1.15;
  text-shadow: 0 2px 12px #21382a55;
  margin-top: 7px;
}
.place-heading p {
  font-size: 10px;
  letter-spacing: 0.35px;
  color: #e0e1ca;
  margin-top: 5px;
}
.world-tools {
  position: absolute;
  right: 32px;
  top: 115px;
  display: flex;
  gap: 9px;
}
.glass-button,
.glass {
  border: 1px solid #eee6be23;
  background: #273b2d50;
  backdrop-filter: blur(10px);
}
.glass-button {
  padding: 9px 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-radius: 4px;
  font-size: 10px;
}
.glass-button svg {
  width: 14px;
  height: 14px;
}
.glass-button:hover {
  background: #283b2eaa;
}
.left-hud {
  position: absolute;
  left: 31px;
  top: 125px;
  width: 247px;
}
.panel {
  background: var(--panel);
  border: 1px solid #b7ba982e;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px #10241618;
  border-radius: 7px;
}
.character-card {
  padding: 20px 17px 12px;
}
.character-top {
  display: flex;
  gap: 13px;
  align-items: center;
}
.portrait {
  width: 56px;
  height: 65px;
  position: relative;
  flex-shrink: 0;
}
.portrait > svg {
  width: 100%;
  height: 100%;
  border: 1px solid #c5b68375;
  border-radius: 4px;
}
.portrait-level {
  position: absolute;
  bottom: -7px;
  left: 18px;
  background: #beac76;
  width: 20px;
  height: 18px;
  text-align: center;
  line-height: 18px;
  font-family: var(--serif);
  font-size: 12px;
  color: #283c2b;
  border-radius: 2px;
}
.character-top .eyebrow {
  font-size: 7px;
  letter-spacing: 1.4px;
}
.character-top h2 {
  font-size: 23px;
  line-height: 1.1;
  margin: 5px 0 5px;
  overflow-wrap: anywhere;
}
.character-top p {
  font-size: 9px;
  color: var(--muted);
}
.house-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 21px 0 19px;
  padding-bottom: 12px;
  border-bottom: var(--border);
  font-size: 10px;
  color: #d6dac5;
}
.house-line svg {
  width: 13px;
  height: 13px;
  color: #afbe97;
}
.house-line > span:last-child {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 1px;
  color: #a9b49d;
}
.vitals {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.vital-row {
  display: grid;
  grid-template-columns: 17px 1fr 30px;
  gap: 7px;
  align-items: center;
}
.vital-row svg {
  width: 13px;
  height: 13px;
  color: var(--vital);
}
.vital-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin-bottom: 5px;
  color: #d5dac8;
}
.vital-track {
  height: 3px;
  background: #c7cba214;
  border-radius: 9px;
  overflow: hidden;
}
.vital-track i {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--vital);
  border-radius: 9px;
  transition: width 0.5s;
}
.vital-row > span {
  font-size: 10px;
  text-align: right;
  align-self: end;
  color: #dedfc9;
}
.character-treasury {
  display: flex;
  justify-content: space-between;
  border-top: var(--border);
  border-bottom: var(--border);
  margin-top: 20px;
  padding: 14px 0;
}
.character-treasury > div {
  display: flex;
  gap: 6px;
  align-items: center;
}
.character-treasury svg {
  width: 17px;
  height: 17px;
  color: #cdb87f;
}
.character-treasury strong {
  font-size: 14px;
  font-weight: 500;
}
.character-treasury span {
  font-size: 8px;
  color: #b8bda6;
}
.text-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  padding: 13px 0 1px;
  color: #bfc8b4;
}
.text-link:hover {
  color: #eee6c4;
}
.journey-menu {
  padding: 24px 7px 0;
}
.journey-menu > .eyebrow {
  display: block;
  font-size: 8px;
  color: #ced3bc;
  margin-bottom: 13px;
}
.journey-menu > button {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 10px 4px;
  font-size: 10px;
  gap: 12px;
  color: #ebecd7;
  text-shadow: 0 1px 4px #182e23;
}
.journey-menu > button svg {
  width: 16px;
  height: 16px;
  color: #d2d0ad;
}
.journey-menu > button > span {
  margin-left: auto;
  font-size: 8px;
  opacity: 0.55;
}
.journey-menu > button:hover {
  background: #3049319c;
  border-radius: 4px;
  transform: translateX(3px);
}
.right-hud {
  position: absolute;
  right: 31px;
  top: 174px;
  width: 242px;
}
.chapter-card {
  padding: 20px 21px 18px;
  background: linear-gradient(145deg, #233c30ed, #283b2be0);
}
.chapter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chapter-top .eyebrow {
  color: #c9bb85;
  font-size: 8px;
  letter-spacing: 2px;
}
.chapter-top svg {
  color: #b5b47d;
  width: 24px;
  height: 24px;
}
.chapter-card h2 {
  font-size: 32px;
  line-height: 1.03;
  margin: 17px 0 13px;
  color: #f0ecd7;
}
.chapter-card > p {
  font-size: 10px;
  color: #c1c8b2;
  line-height: 1.8;
}
.chapter-divider {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 24px 0 13px;
  font-size: 7px;
  letter-spacing: 1.25px;
  color: #bcbf9f;
}
.chapter-divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.objective {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: #d1d6bc;
  padding: 8px 0;
}
.objective > span {
  width: 15px;
  height: 15px;
  border: 1px solid #b1b89765;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.objective svg {
  width: 10px;
  height: 10px;
  color: #bdd3a4;
}
.objective.done {
  color: #a6bf97;
}
.objective.done > span {
  background: #8ca77726;
  border-color: #9db982;
}
.outline-button {
  border: 1px solid #c5bc886b;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 10px;
  width: 100%;
  padding: 11px 12px;
  color: #dfd4ae;
  margin-top: 19px;
}
.outline-button svg {
  width: 14px;
  height: 14px;
}
.outline-button:hover {
  background: #cfbe8330;
}
.whisper {
  padding: 26px 12px;
  text-shadow: 0 2px 8px #162e22;
}
.whisper > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.whisper svg {
  width: 12px;
  height: 12px;
  color: #d7cc9f;
}
.whisper .eyebrow {
  font-size: 7px;
  letter-spacing: 1.2px;
}
.whisper p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.35;
  color: #eeecd8;
  margin: 12px 0 15px;
}
.whisper > span {
  font-size: 7px;
  letter-spacing: 2px;
  color: #d1c59e;
}
.compass-rose {
  position: absolute;
  bottom: 208px;
  left: 43px;
  width: 64px;
  height: 79px;
  pointer-events: none;
  opacity: 0.58;
  text-align: center;
  color: #f1ecd0;
}
.compass-rose > span {
  font-size: 8px;
  letter-spacing: 1px;
}
.compass-rose svg {
  width: 64px;
  height: 64px;
  stroke-width: 0.7;
}
.compass-rose svg path:first-child {
  fill: #eee5bc20;
}
.world-caption {
  position: absolute;
  left: 50%;
  bottom: 212px;
  transform: translateX(-50%);
  font-size: 7px;
  letter-spacing: 1.4px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #e0e4cc;
  text-shadow: 0 1px 4px #21382a;
}
.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d0dfb0;
  box-shadow: 0 0 0 3px #cbdfb017;
}
.bottom-hud {
  position: absolute;
  left: 31px;
  right: 31px;
  bottom: 0;
}
.year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 63px;
  gap: 12px;
}
.date {
  display: flex;
  gap: 12px;
  align-items: center;
}
.date > svg {
  width: 27px;
  height: 27px;
  color: var(--gold);
}
.date > span > strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}
.date small {
  display: block;
  font-size: 8px;
  color: #d0d4bc;
  margin-top: 3px;
}
.year-divider {
  height: 27px;
  width: 1px;
  background: var(--line);
  margin: 0 7px;
}
.year-age {
  font-size: 10px;
}
.year-age span {
  display: block;
  font-size: 8px;
  color: #b9c4ad;
  margin-top: 4px;
}
.world-help {
  display: flex;
  gap: 18px;
  font-size: 8px;
  color: #bfc7b2;
  align-items: center;
}
.world-help b {
  font-size: 7px;
  letter-spacing: 1px;
  font-weight: 500;
  margin-right: 4px;
  color: #e0e2c8;
}
.world-help button {
  font-size: 8px;
  padding: 5px 0;
  color: #d7d9bf;
}
.world-help button span {
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  width: 13px;
  height: 13px;
  border: 1px solid #dfdccb55;
  border-radius: 50%;
  font-size: 8px;
}
.actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: #d9dbc4;
}
#action-dots {
  display: flex;
  gap: 5px;
}
#action-dots i {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: #d8c695;
}
#action-dots i.spent {
  background: transparent;
  border: 1px solid #b4bd9d77;
}
.life-bar {
  height: 86px;
  border: 1px solid #c8c3a04a;
  border-radius: 6px;
  background: linear-gradient(110deg, #293b2fed, #1b3027f5);
  box-shadow: 0 8px 35px #15291e55;
  display: flex;
  align-items: center;
  padding: 11px 12px 11px 19px;
  backdrop-filter: blur(18px);
}
.life-bar-title {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 164px;
  flex-shrink: 0;
  font-size: 7px;
  letter-spacing: 1.5px;
  line-height: 1.8;
  color: #c3c6aa;
}
.life-bar-title > svg {
  width: 23px;
  height: 23px;
  color: #c7bf92;
}
.life-bar-title strong {
  font-weight: 500;
  color: #dedcc1;
}
.life-action {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  height: 51px;
  border-left: var(--border);
  text-align: left;
  padding: 0 19px;
}
.life-action > svg {
  width: 21px;
  height: 21px;
  color: #d8cca5;
}
.life-action > span {
  font-size: 13px;
  color: #efeeda;
}
.life-action small {
  font-size: 8px;
  color: #b0bea7;
  display: block;
  margin-top: 5px;
  white-space: nowrap;
}
.life-action kbd {
  font-family: var(--sans);
  margin-left: auto;
  font-size: 8px;
  align-self: start;
  color: #c3caad6e;
}
.life-action:hover:not(:disabled) {
  background: #bcca9e0e;
  border-radius: 3px;
}
.next-year {
  height: 61px;
  background: #d4c293;
  color: #293b2a;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 4px;
  min-width: 213px;
  text-align: left;
  margin-left: 10px;
  border: 1px solid #e4d5b0;
  box-shadow: 0 2px 9px #101f1830;
}
.next-year > span {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}
.next-year small {
  font: 8px var(--sans);
  display: block;
  margin-top: 3px;
  color: #4f5b3c;
}
.next-year svg {
  width: 19px;
  height: 19px;
}
.next-year:hover {
  background: #e6d6ab;
}
footer {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1.6px;
  color: #aebda3;
}
footer > span:nth-child(2) {
  letter-spacing: 0.2px;
  font-size: 8px;
}
footer > button {
  font-size: 8px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b8c1a5;
}
footer svg {
  width: 12px;
  height: 12px;
}
#world-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.world-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #203729db;
  color: #f0ebd0;
  border: 1px solid #e1d29a50;
  border-radius: 3px;
  padding: 8px 11px;
  font-size: 9px;
  white-space: nowrap;
  box-shadow: 0 4px 14px #243c2850;
  backdrop-filter: blur(6px);
  transition:
    opacity 0.2s,
    background 0.2s;
  will-change: transform;
}
.world-label:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 7px;
  height: 7px;
  background: #273e2c;
  border-right: 1px solid #e1d29a40;
  border-bottom: 1px solid #e1d29a40;
  transform: rotate(45deg);
}
.world-label svg {
  width: 12px;
  height: 12px;
  color: #dacc9b;
}
.world-label:hover {
  background: #47613a;
}
.world-label.player-label {
  border: 0;
  background: transparent;
  font-size: 8px;
  padding: 4px;
  box-shadow: none;
  text-shadow: 0 1px 6px #172b1c;
  color: #fff5cd;
  pointer-events: none;
}
.world-label.player-label:after {
  display: none;
}
#nearby {
  position: absolute;
  bottom: 240px;
  left: 50%;
  transform: translateX(-50%);
  background: #21352beb;
  border: var(--border);
  border-radius: 5px;
  padding: 9px 9px 9px 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 11px;
}
#nearby button {
  padding: 6px 10px;
  background: #d6c79e;
  color: #283a28;
  border-radius: 3px;
  font-size: 10px;
}
kbd {
  font-family: var(--sans);
}
#nearby kbd {
  padding: 1px 5px;
  margin-right: 4px;
  border: 1px solid #3d512d44;
  border-radius: 2px;
}
#toast {
  position: absolute;
  bottom: 210px;
  left: 50%;
  transform: translate(-50%, 10px);
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 13px 22px;
  border: 1px solid #d6c7956b;
  border-radius: 4px;
  background: #f0e8d4;
  color: #334431;
  box-shadow: 0 8px 25px #152a2435;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s,
    opacity 0.25s;
  z-index: 7;
  font-size: 12px;
  text-align: center;
}
#toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
#loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #243a2c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.8s,
    visibility 0.8s;
}
#loading.done {
  opacity: 0;
  visibility: hidden;
}
#loading img {
  width: 60px;
  height: 70px;
  margin-bottom: 30px;
}
#loading h2 {
  font-size: 41px;
  margin: 15px 0;
  color: #e4dabb;
}
#loading p {
  font-size: 11px;
  color: #bfc5ab;
}
.loading-line {
  width: 160px;
  height: 1px;
  background: #aaaf842b;
  margin: 30px;
}
.loading-line i {
  display: block;
  width: 45%;
  height: 100%;
  background: #c6b781;
  animation: loading 1.5s ease-in-out infinite alternate;
}
#loading .primary-button {
  margin-top: 20px;
}
#year-transition {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #243d2bce;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s;
}
#year-transition.visible {
  opacity: 1;
}
#year-transition > span {
  font-size: 10px;
  letter-spacing: 4px;
  color: #d4c28d;
}
#year-transition > strong {
  font-family: var(--serif);
  font-size: 110px;
  font-weight: 400;
  color: #f3e7be;
}
#year-transition > p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
}
.touch-controls {
  display: none;
}
#game-dialog {
  color: var(--ink);
  background: linear-gradient(145deg, #2c4033, #1e332a);
  border: 1px solid #a9b38a66;
  border-radius: 10px;
  padding: 25px 31px 29px;
  width: min(660px, calc(100% - 30px));
  max-height: calc(100dvh - 64px);
  box-shadow: 0 30px 140px #12251adb;
  scrollbar-width: thin;
  scrollbar-color: #9da98150 transparent;
}
#game-dialog::backdrop {
  background: #122b2194;
  backdrop-filter: blur(7px);
}
#game-dialog[open] {
  animation: dialog-in 0.22s ease-out;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dialog-header .eyebrow {
  color: #c9bc8d;
  font-size: 8px;
}
.dialog-header > .icon-button {
  width: 29px;
  height: 29px;
}
#dialog-title {
  font-size: 39px;
  line-height: 1.05;
  margin: 7px 0 12px;
}
.dialog-intro {
  color: #c5ccb6;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 23px;
}
.dialog-section {
  padding: 20px 0;
  border-top: var(--border);
}
.dialog-section > h3 {
  font-size: 24px;
  margin-bottom: 10px;
}
.dialog-section > p {
  font-size: 11px;
  line-height: 1.7;
  color: #c3cbb5;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid #e8d9ac;
  background: #d8c596;
  border-radius: 4px;
  color: #2b3e2b;
  font-weight: 600;
  font-size: 12px;
}
.primary-button:hover:not(:disabled) {
  background: #eddfba;
}
.secondary-button {
  border: var(--border);
  border-radius: 4px;
  color: #d8dcc9;
  padding: 11px 14px;
  font-size: 11px;
}
.secondary-button:hover:not(:disabled) {
  background: #c3cbaa13;
}
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 19px;
  flex-wrap: wrap;
}
.button-row > .primary-button {
  flex: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-bottom: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #c5cbb4;
}
.form-field.wide {
  grid-column: 1/-1;
}
.form-field input,
.form-field select {
  width: 100%;
  background: #172c2380;
  border: 1px solid #b5bf993f;
  border-radius: 4px;
  padding: 12px;
  color: #f1eddc;
  font-size: 13px;
  outline-offset: 2px;
}
.form-field select option {
  background: #263d2d;
}
.origin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 22px;
}
.origin-option {
  display: block;
  text-align: left;
  border: var(--border);
  border-radius: 4px;
  padding: 13px;
  cursor: pointer;
}
.origin-option:has(input:checked) {
  border-color: #cbbb7a;
  background: #c1b27513;
}
.origin-option input {
  accent-color: #c3b57c;
  margin-right: 7px;
}
.origin-option strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.origin-option span {
  display: block;
  font-size: 9px;
  margin: 7px 0 0 23px;
  color: #b9c7b0;
}
.subheading {
  font-size: 9px;
  letter-spacing: 1px;
  color: #c9bf91;
  margin-bottom: 10px;
}
.notice {
  font-size: 11px;
  line-height: 1.8;
  padding: 12px 15px;
  border-left: 2px solid #b7b57e;
  background: #b7bb8010;
  color: #cfd3b9;
  margin: 16px 0;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice-card {
  padding: 16px 18px;
  border: 1px solid #b9c39932;
  border-radius: 5px;
  text-align: left;
  background: #18302640;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
}
.choice-card:hover:not(:disabled) {
  border-color: #c5b986;
  background: #c4bc8a0e;
}
.choice-card h3 {
  font-size: 23px;
  margin-bottom: 5px;
}
.choice-card p {
  font-size: 11px;
  line-height: 1.6;
  color: #c0cbb2;
}
.choice-card small {
  display: block;
  color: #d5c28b;
  font-size: 10px;
  margin-top: 9px;
}
.choice-card > svg {
  width: 17px;
  color: #cbbb86;
}
.choice-card.selected {
  border-color: #ccbd88;
}
.choice-card .primary-button {
  white-space: nowrap;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.stat-tile {
  padding: 14px;
  background: #132d2266;
  border: var(--border);
  border-radius: 4px;
}
.stat-tile > span {
  display: block;
  font-size: 9px;
  color: #b9c6ad;
}
.stat-tile > strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-top: 7px;
  color: #eee3bd;
}
.relationship {
  padding: 17px 0;
  border-top: var(--border);
}
.relationship-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.relationship h3 {
  font-size: 25px;
}
.relationship-heading > span {
  font-size: 9px;
  color: #cdb984;
}
.relationship p {
  color: #bfcab1;
  font-size: 11px;
  line-height: 1.7;
  margin: 5px 0 11px;
}
.relationship .vital-track {
  height: 4px;
}
.relationship .vital-track i {
  background: #bf9d8c;
}
.allocation {
  display: grid;
  grid-template-columns: 65px 1fr 40px;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  font-size: 11px;
}
.allocation input {
  width: 100%;
  accent-color: #ccbb87;
}
.allocation output {
  font-size: 11px;
  color: #d6c596;
  text-align: right;
}
.log-entry {
  border-left: 1px solid #b4b98450;
  padding: 0 0 22px 20px;
  position: relative;
}
.log-entry:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: #bdb589;
}
.log-entry > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: #c6b781;
}
.log-entry p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  color: #e0e2ce;
  margin-top: 7px;
}
.family-tree {
  text-align: center;
  margin: 24px 0;
}
.family-person {
  border: var(--border);
  background: #20392c;
  border-radius: 5px;
  padding: 15px;
  max-width: 280px;
  margin: auto;
}
.family-person.current {
  border-color: #d5c08b70;
}
.family-person strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}
.family-person span {
  display: block;
  font-size: 10px;
  color: #bdc7ad;
  margin-top: 5px;
}
.family-link {
  height: 25px;
  width: 1px;
  margin: auto;
  background: #acb38b70;
}
.family-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.family-pair .family-person {
  width: 100%;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: var(--border);
  gap: 20px;
}
.settings-row strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.settings-row small {
  font-size: 10px;
  color: #b6c3aa;
  display: block;
  margin-top: 5px;
}
.settings-row input[type="checkbox"] {
  accent-color: #c2b681;
  width: 18px;
  height: 18px;
}
.settings-row select {
  color: #dce0cd;
  background: #20372b;
  border: var(--border);
  border-radius: 3px;
  padding: 7px;
}
.settings-footer {
  color: #aeba9f;
  font-size: 10px;
  line-height: 1.8;
  margin-top: 20px;
}
.settings-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.empty-state {
  padding: 24px;
  border: 1px dashed #aaba893f;
  text-align: center;
  color: #c6ceb6;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
}
.inline-error {
  font-size: 11px;
  color: #efb69e;
  line-height: 1.7;
}
.tag {
  display: inline-block;
  padding: 5px 8px;
  border: var(--border);
  font-size: 9px;
  border-radius: 3px;
  color: #c9c3a1;
  margin: 4px 4px 0 0;
}
.range-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 24px;
}
.range-list .vital-label {
  font-size: 10px;
}
.list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 23px 0 13px;
}
.list-title h3 {
  font-size: 23px;
}
.list-title > span {
  font-size: 10px;
  color: #c9bd8b;
}
.event-quote {
  font-family: var(--serif);
  font-size: 26px;
  font-style: italic;
  line-height: 1.45;
  color: #e4dfc9;
  margin: 24px 0;
}
.receipt {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: var(--border);
  font-size: 11px;
  color: #c4cdb5;
}
.receipt strong {
  font-weight: 500;
  color: #ddcca0;
}
.muted {
  color: #b9c6ab;
  font-size: 10px;
  line-height: 1.7;
}
.error-overlay {
  padding: 30px;
  text-align: center;
}
@keyframes loading {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(125%);
  }
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  .left-hud {
    width: 276px;
    left: 42px;
    top: 145px;
  }
  .right-hud {
    width: 270px;
    right: 42px;
    top: 196px;
  }
  .character-card {
    padding: 24px 21px 14px;
  }
  .character-top h2 {
    font-size: 26px;
  }
  .vitals {
    gap: 17px;
  }
  .journey-menu > button {
    padding: 13px 4px;
    font-size: 12px;
  }
  .chapter-card {
    padding: 24px;
  }
  .chapter-card h2 {
    font-size: 38px;
  }
  .chapter-card > p {
    font-size: 12px;
  }
  .objective {
    font-size: 11px;
    padding: 10px 0;
  }
  .place-heading {
    top: 143px;
  }
  .place-heading h1 {
    font-size: 59px;
  }
  .bottom-hud {
    left: 42px;
    right: 42px;
  }
  .life-bar {
    height: 96px;
  }
  .life-action {
    padding: 0 28px;
  }
  .life-action > span {
    font-size: 15px;
  }
  .life-action small {
    font-size: 10px;
  }
  .life-bar-title {
    width: 194px;
  }
  .next-year {
    min-width: 250px;
  }
  .world-caption {
    bottom: 228px;
  }
  .compass-rose {
    bottom: 225px;
  }
  .world-help {
    font-size: 10px;
  }
  .year-row {
    height: 70px;
  }
  .world-label {
    font-size: 10px;
    padding: 9px 13px;
  }
}
@media (max-height: 800px) and (min-width: 1001px) {
  .topbar {
    height: 76px;
  }
  .left-hud {
    top: 100px;
  }
  .place-heading {
    top: 104px;
  }
  .world-tools {
    top: 96px;
  }
  .right-hud {
    top: 145px;
  }
  .character-card {
    padding-top: 15px;
  }
  .vitals {
    gap: 10px;
  }
  .house-line {
    margin: 16px 0 13px;
  }
  .character-treasury {
    margin-top: 15px;
    padding: 11px 0;
  }
  .journey-menu {
    padding-top: 17px;
  }
  .journey-menu > .eyebrow {
    margin-bottom: 6px;
  }
  .journey-menu > button {
    padding: 8px 4px;
  }
  .chapter-card h2 {
    font-size: 29px;
  }
  .chapter-card {
    padding: 16px 18px;
  }
  .chapter-divider {
    margin-top: 17px;
  }
  .whisper {
    padding-top: 17px;
  }
  .whisper p {
    font-size: 19px;
  }
  .life-bar {
    height: 76px;
  }
  .life-action {
    height: 46px;
  }
  .next-year {
    height: 54px;
  }
  .year-row {
    height: 54px;
  }
  .world-caption {
    bottom: 188px;
  }
  .compass-rose {
    bottom: 190px;
  }
  .world-help {
    gap: 12px;
  }
}
@media (max-width: 1150px) {
  .topbar {
    padding: 0 22px;
  }
  .topbar nav {
    gap: 25px;
  }
  .top-actions,
  .brand {
    min-width: 200px;
  }
  .left-hud {
    left: 22px;
    width: 217px;
  }
  .right-hud {
    right: 22px;
    width: 212px;
  }
  .character-top {
    gap: 10px;
  }
  .character-top h2 {
    font-size: 21px;
  }
  .portrait {
    width: 47px;
    height: 56px;
  }
  .character-card {
    padding: 15px;
  }
  .chapter-card {
    padding: 17px;
  }
  .chapter-card h2 {
    font-size: 29px;
  }
  .bottom-hud {
    left: 22px;
    right: 22px;
  }
  .life-bar-title {
    display: none;
  }
  .life-action {
    padding: 0 16px;
  }
  .life-action:first-of-type {
    border-left: 0;
  }
  .life-action kbd {
    display: none;
  }
  .next-year {
    min-width: 195px;
    padding: 0 18px;
  }
  .world-help {
    gap: 13px;
  }
  .world-tools {
    right: 22px;
  }
  .place-heading h1 {
    font-size: 43px;
  }
  .world-caption {
    font-size: 6px;
  }
  .whisper {
    padding: 22px 7px;
  }
  .whisper p {
    font-size: 19px;
  }
}
@media (max-width: 1000px) {
  .topbar {
    height: 76px;
  }
  .brand {
    min-width: auto;
  }
  .brand strong {
    font-size: 23px;
  }
  .brand-crest {
    width: 36px;
    height: 42px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .top-actions {
    min-width: auto;
    gap: 5px;
  }
  .save-status {
    display: none;
  }
  .topbar nav {
    gap: 23px;
  }
  .nav-link {
    font-size: 11px;
  }
  .left-hud {
    top: 97px;
    width: 205px;
  }
  .right-hud {
    top: 147px;
    width: 194px;
  }
  .place-heading {
    top: 102px;
    width: 290px;
    left: calc(50% - 145px);
  }
  .place-heading h1 {
    font-size: 39px;
  }
  .place-heading p {
    font-size: 8px;
  }
  .chapter-card h2 {
    font-size: 27px;
  }
  .chapter-card > p {
    font-size: 9px;
  }
  .objective {
    font-size: 9px;
  }
  .chapter-top .eyebrow {
    font-size: 7px;
  }
  .world-tools {
    top: 97px;
  }
  .world-tools .glass-button span {
    display: none;
  }
  .world-help > span {
    display: none;
  }
  .life-action {
    gap: 9px;
    padding: 0 12px;
  }
  .life-action small {
    font-size: 7px;
  }
  .life-action > svg {
    width: 17px;
    height: 17px;
  }
  .life-action > span {
    font-size: 12px;
  }
  .next-year {
    min-width: 172px;
    padding: 0 13px;
    gap: 12px;
  }
  .next-year small {
    font-size: 7px;
  }
  .next-year > span {
    font-size: 20px;
  }
  .year-row {
    height: 60px;
  }
  .world-caption {
    display: none;
  }
  .compass-rose {
    display: none;
  }
  .journey-menu > button {
    font-size: 10px;
  }
  .whisper .eyebrow {
    font-size: 6px;
  }
  .whisper p {
    font-size: 18px;
  }
  .world-label {
    padding: 6px 8px;
    font-size: 8px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 69px;
    padding: 0 17px;
  }
  .brand {
    gap: 8px;
  }
  .brand-crest {
    width: 30px;
    height: 36px;
  }
  .brand-crest svg {
    width: 23px;
    height: 27px;
  }
  .brand strong {
    font-size: 20px;
    letter-spacing: 3px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.6px;
  }
  .brand-flourish {
    display: none;
  }
  .topbar nav {
    gap: 15px;
    margin-left: auto;
    margin-right: 14px;
  }
  .nav-link {
    font-size: 10px;
  }
  .nav-link:first-child {
    display: none;
  }
  .top-actions #sound-toggle {
    display: none;
  }
  .top-actions .icon-button {
    width: 25px;
  }
  .place-heading {
    top: 94px;
    width: 230px;
    left: calc(50% - 115px);
  }
  .place-heading h1 {
    font-size: 40px;
  }
  .place-heading .eyebrow {
    font-size: 6px;
  }
  .place-heading p {
    font-size: 8px;
  }
  .world-tools {
    right: 16px;
    top: 84px;
  }
  .world-tools #pause {
    display: none;
  }
  .glass-button {
    padding: 7px;
  }
  .world-tools .glass-button svg {
    width: 15px;
    height: 15px;
  }
  .left-hud {
    top: auto;
    bottom: 205px;
    left: 17px;
    width: 178px;
  }
  .character-card {
    padding: 12px;
  }
  .character-top {
    gap: 9px;
  }
  .portrait {
    width: 36px;
    height: 44px;
  }
  .portrait-level {
    left: 10px;
    width: 16px;
    height: 14px;
    font-size: 10px;
    line-height: 14px;
  }
  .character-top h2 {
    font-size: 19px;
    margin: 4px 0;
  }
  .character-top p {
    font-size: 8px;
  }
  .character-top .eyebrow {
    font-size: 6px;
  }
  .house-line {
    margin: 16px 0 11px;
    padding-bottom: 10px;
    font-size: 8px;
    gap: 5px;
  }
  .house-line > span:last-child {
    font-size: 6px;
  }
  .house-line svg {
    width: 11px;
    height: 11px;
  }
  .vitals {
    gap: 10px;
  }
  .vital-label {
    font-size: 8px;
  }
  .vital-row > span {
    font-size: 9px;
  }
  .vital-row {
    gap: 5px;
    grid-template-columns: 13px 1fr 22px;
  }
  .vital-row svg {
    width: 11px;
    height: 11px;
  }
  .character-treasury {
    padding: 10px 0;
    margin-top: 13px;
    border-bottom: 0;
  }
  .character-treasury strong {
    font-size: 12px;
  }
  .character-treasury span {
    font-size: 7px;
  }
  .character-treasury svg {
    width: 14px;
    height: 14px;
  }
  .character-treasury > div {
    gap: 4px;
  }
  .character-card > .text-link {
    font-size: 8px;
    border-top: var(--border);
    padding-top: 9px;
  }
  .journey-menu {
    display: none;
  }
  .right-hud {
    top: auto;
    bottom: 222px;
    right: 17px;
    width: 165px;
  }
  .chapter-card {
    padding: 13px;
    background: #233c30c9;
  }
  .chapter-card h2 {
    font-size: 25px;
    margin: 12px 0 10px;
  }
  .chapter-card > p {
    font-size: 8px;
    line-height: 1.7;
  }
  .chapter-top svg {
    width: 18px;
    height: 18px;
  }
  .chapter-top .eyebrow {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .chapter-divider {
    margin: 15px 0 8px;
    font-size: 6px;
    letter-spacing: 1px;
  }
  .objective {
    font-size: 8px;
    gap: 7px;
    padding: 6px 0;
  }
  .objective > span {
    width: 12px;
    height: 12px;
  }
  .outline-button {
    padding: 9px;
    font-size: 8px;
    margin-top: 12px;
    gap: 6px;
  }
  .outline-button svg {
    width: 11px;
  }
  .whisper {
    display: none;
  }
  .bottom-hud {
    left: 13px;
    right: 13px;
  }
  .year-row {
    height: 55px;
  }
  .date {
    gap: 7px;
  }
  .date > svg {
    width: 21px;
  }
  .date > span > strong {
    font-size: 24px;
  }
  .date small {
    font-size: 7px;
  }
  .year-divider {
    margin: 0 3px;
    height: 25px;
  }
  .year-age {
    font-size: 9px;
  }
  .year-age span {
    font-size: 7px;
  }
  .world-help {
    position: absolute;
    right: 0;
    bottom: 174px;
  }
  .actions-left {
    font-size: 8px;
    gap: 7px;
  }
  #action-dots {
    gap: 4px;
  }
  #action-dots i {
    width: 4px;
    height: 4px;
  }
  .life-bar {
    height: 109px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    border-radius: 5px;
  }
  .life-action {
    height: 40px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    gap: 6px;
  }
  .life-action > span {
    font-size: 10px;
  }
  .life-action > svg {
    width: 15px;
    height: 15px;
  }
  .life-action small {
    display: none;
  }
  .next-year {
    grid-column: 1/-1;
    height: 43px;
    min-width: 0;
    margin: 0;
    justify-content: center;
    gap: 25px;
    padding: 0 13px;
  }
  .next-year > span {
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .next-year small {
    font-family: var(--sans);
    font-size: 8px;
    margin: 0;
  }
  .next-year svg {
    width: 17px;
  }
  footer {
    height: 30px;
    font-size: 5px;
    letter-spacing: 1px;
  }
  footer > span:nth-child(2) {
    font-size: 7px;
  }
  footer > button {
    display: none;
  }
  .world-label {
    font-size: 8px;
    padding: 7px 8px;
    gap: 5px;
  }
  .world-label svg {
    width: 10px;
    height: 10px;
  }
  #nearby {
    bottom: 510px;
    font-size: 10px;
    max-width: 90%;
    white-space: nowrap;
  }
  #nearby button {
    font-size: 9px;
  }
  #toast {
    bottom: 197px;
    font-size: 10px;
    padding: 11px 15px;
  }
  #game-dialog {
    padding: 18px 20px 22px;
    max-height: calc(100dvh - 30px);
  }
  #dialog-title {
    font-size: 33px;
  }
  .dialog-intro {
    font-size: 11px;
  }
  .choice-card {
    padding: 13px;
  }
  .choice-card h3 {
    font-size: 22px;
  }
  .choice-card p {
    font-size: 10px;
  }
  .choice-card small {
    font-size: 9px;
  }
  .stat-grid {
    gap: 7px;
  }
  .stat-tile {
    padding: 11px;
  }
  .stat-tile > strong {
    font-size: 25px;
  }
  .stat-tile > span {
    font-size: 8px;
  }
  .form-grid {
    gap: 14px;
  }
  .origin-option {
    padding: 10px;
  }
  .origin-option strong {
    font-size: 17px;
  }
  .origin-option span {
    font-size: 8px;
    margin-left: 0;
  }
  .touch-controls {
    position: absolute;
    top: 177px;
    left: 16px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    opacity: 0.6;
  }
  .touch-controls button {
    height: 28px;
    width: 28px;
    border: 1px solid #d9dcb433;
    border-radius: 4px;
    background: #203c2880;
    font-size: 14px;
  }
  .touch-controls > div {
    display: flex;
    gap: 3px;
  }
  .touch-controls button:active {
    background: #a0b38070;
  }
  .range-list {
    gap: 15px;
  }
  .family-pair {
    gap: 8px;
  }
  .family-person strong {
    font-size: 20px;
  }
  #loading h2 {
    font-size: 30px;
  }
}
@media (max-width: 390px) {
  .right-hud {
    width: 145px;
    right: 13px;
  }
  .left-hud {
    width: 167px;
    left: 13px;
  }
  .chapter-card {
    padding: 11px;
  }
  .chapter-card h2 {
    font-size: 23px;
  }
  .character-top h2 {
    font-size: 17px;
  }
  .topbar nav {
    gap: 12px;
    margin-right: 10px;
  }
  .next-year small {
    font-size: 7px;
  }
  .actions-left {
    font-size: 7px;
  }
}
@media (max-height: 720px) and (max-width: 760px) {
  .left-hud {
    bottom: 187px;
  }
  .right-hud {
    bottom: 187px;
  }
  .character-card .vitals {
    display: none;
  }
  .character-treasury {
    margin-top: 7px;
  }
  .character-card .house-line {
    margin-bottom: 0;
  }
  .chapter-card > p,
  .chapter-divider {
    display: none;
  }
  .chapter-card h2 {
    font-size: 23px;
  }
  .chapter-card .outline-button {
    margin-top: 7px;
  }
  .world-help {
    bottom: 159px;
  }
  .life-bar {
    height: 95px;
  }
  .next-year {
    height: 38px;
  }
  .life-action {
    height: 34px;
  }
  .year-row {
    height: 49px;
  }
  .place-heading {
    top: 85px;
  }
  .touch-controls {
    top: 163px;
  }
  #nearby {
    bottom: 390px;
  }
  .character-top .portrait {
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 760px) {
  .left-hud {
    bottom: 205px;
  }
  .right-hud {
    bottom: 213px;
  }
  .character-card .house-line {
    display: none;
  }
  .character-card .vitals {
    margin-top: 15px;
    gap: 8px;
  }
  .character-treasury {
    margin-top: 11px;
    padding: 8px 0;
  }
  .chapter-card > p,
  .chapter-divider {
    display: none;
  }
  .chapter-card h2 {
    margin-bottom: 13px;
    font-size: 25px;
  }
  .chapter-card .objective {
    padding: 5px 0;
  }
  .chapter-card .outline-button {
    margin-top: 11px;
  }
  .character-card .text-link {
    padding-top: 8px;
  }
  .touch-controls {
    opacity: 0.75;
  }
}
@media (max-height: 720px) and (max-width: 760px) {
  .left-hud,
  .right-hud {
    bottom: 185px;
  }
  .character-card .vitals {
    display: none;
  }
  .character-treasury {
    margin-top: 13px;
  }
}
#chronicle-dot.unread {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d8c18a;
  margin-left: 5px;
  vertical-align: middle;
}

.icon-button.has-save-error {
  position: relative;
}
.icon-button.has-save-error:after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e1a98a;
}
@media (max-width: 760px) {
  .topbar nav {
    gap: 12px;
  }
  .nav-link:first-child {
    display: block;
    font-size: 0;
  }
  .nav-link:first-child:before {
    content: "World";
    font-size: 9px;
  }
  .nav-link {
    font-size: 9px;
  }
  .topbar .brand {
    gap: 7px;
  }
  .topbar nav {
    margin-right: 9px;
  }
}

@media (max-height: 950px) {
  .compass-rose {
    display: none;
  }
}

/* Director edition: warm brass controls and an unobtrusive stage for everyday life. */
#director-toggle { border-color: #d8c18a66; color: #f0dbab; }
#director-dot { width: 5px; height: 5px; border-radius: 50%; background: #829080; }
#director-toggle.active #director-dot { background: #d8c18a; }
#director-toggle.active { background: #71644770; }
.world-caption { display: none; }
.playground-dock {
  position: absolute; left: 50%; bottom: 213px; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px;
  border: 1px solid #ddd0ad30; border-radius: 12px;
  background: #21382de8; backdrop-filter: blur(14px); box-shadow: 0 12px 40px #17271e30;
}
.mood-label { display: flex; align-items: center; gap: 7px; padding: 0 2px 10px; }
.mood-label > span { width: 6px; height: 6px; border-radius: 50%; background: #b5c893; }
.mood-label strong { font-size: 10px; font-weight: 500; }
.mood-label small { margin-left: auto; padding-left: 20px; color: #b6bdac; font-size: 7px; letter-spacing: 1.4px; }
.emote-actions { display: flex; gap: 3px; }
.emote-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border-radius: 5px; font-size: 10px; background: #ffffff07; }
.emote-actions svg { width: 14px; height: 14px; }
.emote-actions [data-emote=jump] svg { transform: rotate(-90deg); }
.emote-actions button:hover, .emote-actions button[aria-pressed=true] { color: #f0dbab; background: #d8c18a25; }
#activity-cue { position: absolute; top: 250px; left: 50%; transform: translate(-50%, -8px); width: max-content; max-width: 340px; padding: 13px 22px 16px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .3s, transform .3s; background: #20352ade; border: 1px solid #d8c18a33; border-radius: 8px; overflow: hidden; }
#activity-cue.visible { opacity: 1; transform: translate(-50%, 0); }
#activity-cue span { display: block; color: #c9c2a7; font-size: 7px; letter-spacing: 2px; margin-bottom: 6px; }
#activity-cue strong { font: 500 23px var(--serif); }
#activity-cue i { position: absolute; bottom: 0; height: 2px; left: 0; right: 0; background: #d8c18a; transform-origin: left; }
#year-transition { background: linear-gradient(0deg, #1c302cce, transparent 65%); backdrop-filter: none; justify-content: flex-end; padding-bottom: 315px; }
#year-transition > strong { font-size: 76px; line-height: 1.1; text-shadow: 0 4px 24px #20352a; }
#year-transition > p { margin: 8px 0; }
#year-recap { font-size: 10px; letter-spacing: 1px; color: #e2d7b8; }
.director-banner { display: flex; align-items: center; gap: 15px; background: #d8c18a0c; border: 1px solid #d8c18a30; border-radius: 8px; padding: 18px; margin: 22px 0; }
.director-banner > svg { flex-shrink: 0; width: 28px; height: 28px; color: var(--gold); }
.director-banner strong { display: block; font: 500 23px var(--serif); margin-bottom: 4px; }
.director-banner span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.director-control { position: relative; display: flex; align-items: center; gap: 14px; padding: 17px 0; border-bottom: var(--border); cursor: pointer; }
.director-control > svg { width: 20px; height: 20px; color: #c4bd99; flex-shrink: 0; }
.director-control > span { flex: 1; }
.director-control strong, .director-grants strong, .director-unlock strong { display: block; font-size: 13px; font-weight: 550; margin-bottom: 5px; }
.director-control small, .director-grants small, .director-unlock small { display: block; color: var(--muted); font-size: 10px; line-height: 1.6; }
.director-control input { position: absolute; right: 0; width: 44px; height: 26px; opacity: 0; }
.director-control > i { position: relative; width: 44px; height: 26px; flex-shrink: 0; border-radius: 20px; background: #ffffff12; border: 1px solid #d8c18a40; transition: background .2s; }
.director-control > i::before { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: #949f90; transition: transform .2s, background .2s; }
.director-control input:checked + i { background: #d8c18a; }
.director-control input:checked + i::before { transform: translateX(18px); background: #26392e; }
.director-control input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 4px; }
.director-section { padding: 24px 0 6px; }
.director-section > .eyebrow { display: block; margin-bottom: 14px; }
.director-name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.director-name-fields label { font-size: 11px; color: var(--muted); }
.director-name-fields input { display: block; width: 100%; min-width: 0; padding: 12px; margin-top: 8px; border-radius: 5px; border: var(--border); background: #182b2370; color: var(--ink); }
.director-grants { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.director-grants .choice-card { display: flex; gap: 10px; text-align: left; padding: 16px; }
.director-grants .choice-card > svg { width: 20px; height: 20px; flex-shrink: 0; }
.director-unlock { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; border: 1px solid #d8c18a60; background: #d8c18a12; border-radius: 7px; margin: 12px 0 14px; padding: 20px; }
.director-unlock > svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--gold); }
.director-unlock > span { flex: 1; }
.director-unlock:hover { background: #d8c18a25; }
.inline-error { color: #edb392; font-size: 11px; }
@media (min-width: 1600px) { .playground-dock { bottom: 237px; } }
@media (max-width: 1000px) and (min-width: 761px) {
  .playground-dock { bottom: 195px; padding: 10px; }
  .emote-actions button { padding: 9px 8px; }
  .emote-actions svg { display: none; }
}
@media (max-width: 760px) {
  .playground-dock { top: 285px; bottom: auto; padding: 10px 12px; }
  .emote-actions button { min-height: 38px; padding: 8px 11px; }
  .emote-actions svg { display: none; }
  .mood-label { padding-bottom: 8px; }
  #activity-cue { top: 365px; padding: 9px 15px; max-width: calc(100% - 40px); }
  #activity-cue strong { font-size: 20px; }
  #year-transition { padding-bottom: 355px; }
  #year-transition > strong { font-size: 55px; }
  #year-transition > p { font-size: 20px; }
  .director-grants { grid-template-columns: 1fr; }
  .director-name-fields { gap: 10px; }
  .touch-controls button { width: 36px; height: 36px; }
  #director-toggle { min-height: 34px; min-width: 42px; }
}
@media (max-width: 760px) and (max-height: 740px) {
  .playground-dock { top: 166px; left: auto; right: 12px; transform: none; padding: 8px; }
  .mood-label small, .emote-actions svg { display: none; }
  .emote-actions button { font-size: 8px; padding: 7px; min-height: 32px; }
  #activity-cue { top: 255px; }
}
@media (prefers-reduced-motion: reduce) {
  #activity-cue, .director-control > i, .director-control > i::before { transition: none; }
}
.director-control input { z-index: 1; margin: 0; cursor: pointer; }
@media (min-width: 761px) { #toast { bottom: 310px; } }
@media (min-width: 1600px) { #toast { bottom: 340px; } }
@media (max-width: 760px) { .touch-controls button { width: 44px; height: 44px; } }
#install-app[hidden] { display: none; }
#install-app { color: var(--gold); }
