:root {
  color-scheme: light;
  --paper: #f8f0dd;
  --ink: #333e36;
  --muted: #646b5a;
  --line: #c8bda0;
  --green: #425f50;
  --rust: #9a513c;
  font-family: Georgia, "Noto Serif TC", serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff9e9;
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: #e5e8d2;
  border-color: var(--green);
}
button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ab542e;
  outline-offset: 3px;
}
button[aria-pressed="true"],
.primary {
  background: var(--green);
  color: #fff9e9;
  border-color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 25px;
  font-weight: 400;
  margin-bottom: 0;
}
h2 {
  font-weight: 400;
  font-size: 27px;
  margin-top: 22px;
}
h3 {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 20px;
}
p {
  line-height: 1.55;
}
small,
.small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.eyebrow {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.global-controls {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 12;
  display: flex;
  gap: 5px;
}
.global-controls button {
  font-size: 12px;
  padding: 8px 12px;
  background: #f8f0ddf0;
  box-shadow: 0 2px 7px #4d3c2020;
}
.title-screen {
  height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d8d5b9;
  overflow: hidden;
}
.title-screen:before {
  content: "";
  position: absolute;
  inset: -30px;
  background: url("../assets/approved/cover-master.png") center/cover;
  filter: blur(24px);
  opacity: 0.45;
}
.title-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
}
.start-plate {
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 12px 26px;
  background: #f9efdbed;
  border: 1px solid #947f5f;
  box-shadow: 0 8px 35px #3b3b2633;
  border-radius: 6px;
}
.start-plate p {
  font-size: 10px;
  letter-spacing: 0.17em;
  margin-bottom: 7px;
}
.start {
  font-size: 24px;
  letter-spacing: 0.15em;
  background: var(--green);
  color: #fff6e2;
  padding: 12px 47px;
}
.start-plate span {
  font-size: 12px;
  margin-top: 8px;
}
.title-footer {
  position: absolute;
  bottom: 22px;
  left: 24px;
  font-size: 11px;
  background: #f8f0dddf;
  padding: 5px 10px;
}
.picker {
  max-width: 800px;
  margin: 8vh auto;
  padding: 30px;
}
.picker h1 {
  font-size: 43px;
}
.picker blockquote {
  margin: 25px 0;
  border-left: 3px solid #b5835b;
  padding: 8px 20px;
  font-size: 22px;
  line-height: 1.6;
}
.assignment-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 30px 0;
}
.assignment-list button {
  text-align: left;
  padding: 24px;
}
.game {
  min-height: 100svh;
  padding-bottom: 76px;
}
header {
  padding: 18px 24px 15px;
  display: flex;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  background: #f9f2e2;
}
.date {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.date time {
  font-size: 27px;
  letter-spacing: 0.06em;
}
.date b {
  font-size: 12px;
  font-weight: 400;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
}
.map-panel {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 18px 22px 10px;
}
.map-frame {
  overflow: hidden;
  border: 1px solid #bcb294;
  border-radius: 50% 50% 5px 5px / 5% 5% 5px 5px;
  box-shadow: 0 5px 22px #73603e15;
  background: #d4d7ac;
}
#town {
  display: block;
  width: 100%;
  max-height: calc(100svh - 285px);
  transform-origin: center;
  transition: transform 0.3s;
}
#town.evening-light {
  filter: sepia(0.15) brightness(0.91);
}
.map-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.map-toolbar button {
  padding: 7px 12px;
}
.map-caption {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin: 9px 0;
}
.resident-strip {
  display: flex;
  justify-content: space-around;
  gap: 3px;
}
.resident-strip button {
  border: 0;
  background: transparent;
  padding: 3px;
  min-width: 44px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resident-strip svg {
  height: 51px;
  width: 35px;
}
.actor {
  cursor: pointer;
  outline-offset: 4px;
}
.actor:focus-visible {
  outline: 3px solid #8c4f35;
}
.actor.walking > g {
  animation: walk 0.6s alternate infinite;
}
.window {
  animation: glow 5s ease-in-out alternate infinite;
}
.bus {
  animation: idle 3s alternate infinite;
}
.tree {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: sway 7s alternate infinite;
}
.desk {
  padding: 25px 22px;
  border-left: 1px solid var(--line);
  background: #fdf5e4;
  max-height: calc(100svh - 180px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.goal {
  font-size: 19px;
  line-height: 1.4;
}
.metrics {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.options {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.option {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #fffbed;
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--green);
  background: #e7ead8;
}
.option input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--green);
}
.option strong,
.option span span,
.option small {
  display: block;
}
.option strong {
  font-size: 14px;
  font-weight: 400;
  margin: 4px 0;
}
.option span span {
  font-size: 12px;
  line-height: 1.45;
  color: #61624e;
}
.option small {
  font:
    9px system-ui,
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.option.disabled {
  opacity: 0.55;
  cursor: default;
}
.desk-tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 19px 0;
}
.desk-tools button {
  font-size: 12px;
  flex: 1;
}
.event {
  font-size: 12px;
  line-height: 1.5;
  border-left: 2px solid #b9b38b;
  padding-left: 10px;
  margin-bottom: 13px;
}
.event small {
  display: block;
  font-size: 10px;
}
.transport {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 310px 12px 22px;
  background: #eee5d1f5;
  border-top: 1px solid var(--line);
  z-index: 10;
}
.transport button {
  font-size: 12px;
}
.transport span {
  font-size: 10px;
  color: #666853;
}
.modal-shade {
  position: fixed;
  inset: 0;
  background: #243b3580;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: 25px;
}
.modal {
  width: min(880px, 100%);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid #a6a080;
  border-radius: 8px;
  padding: 24px 30px;
  box-shadow: 0 20px 80px #142e3260;
}
.modal-top {
  position: sticky;
  top: -24px;
  background: var(--paper);
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 5px 0 10px;
}
.modal button {
  margin: 4px;
}
.modal label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}
.modal input,
.modal select,
select {
  padding: 10px;
  min-height: 44px;
  max-width: 100%;
  background: #fffaed;
  border: 1px solid var(--line);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
}
.event-log {
  padding-left: 25px;
}
.event-log li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.event-log li:target {
  background: #dfdfbd;
}
.event-log p {
  margin: 4px 0;
}
.deps {
  font-size: 12px;
  line-height: 1.7;
}
.deps a {
  color: #475b42;
}
.person-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}
.person-heading svg {
  height: 110px;
  width: 80px;
}
.person-heading h2 {
  font-size: 35px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
td,
th {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  line-height: 1.6;
}
details {
  border: 1px solid var(--line);
  padding: 12px;
  margin-top: 8px;
}
summary {
  cursor: pointer;
  min-height: 30px;
}
.branch-row {
  display: flex;
}
.outcomes {
  font-size: 13px;
  line-height: 1.6;
  padding-left: 20px;
}
.warning {
  position: fixed;
  left: 12px;
  bottom: 75px;
  max-width: 500px;
  z-index: 30;
  background: #f9e5bf;
  border: 2px solid #a35c3f;
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
}
@keyframes sway {
  to {
    transform: rotate(0.8deg);
  }
}
@keyframes glow {
  to {
    opacity: 0.83;
  }
}
@keyframes walk {
  to {
    transform: translateY(-2px);
  }
}
@keyframes idle {
  to {
    transform: translateY(0.8px);
  }
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
  .map-panel {
    max-width: 1250px;
    justify-self: center;
    width: 100%;
  }
}
@media (max-width: 800px) {
  header {
    padding: 12px;
    gap: 10px;
  }
  h1 {
    font-size: 19px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .date time {
    font-size: 22px;
  }
  header button {
    font-size: 11px;
    padding: 7px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .map-panel {
    position: relative;
    padding: 10px 10px 0;
  }
  #town {
    max-height: none;
  }
  .map-toolbar {
    gap: 3px;
  }
  .map-toolbar button {
    padding: 7px 10px;
  }
  .map-caption {
    font-size: 9px;
  }
  .resident-strip svg {
    height: 42px;
  }
  .resident-strip button {
    font-size: 10px;
    min-width: 38px;
  }
  .desk {
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px;
  }
  .options {
    grid-template-columns: 1fr 1fr;
  }
  .option {
    padding: 10px 7px;
  }
  .option strong {
    font-size: 13px;
  }
  .option span span {
    font-size: 11px;
  }
  .transport {
    position: sticky;
    padding: 10px 10px 65px;
    gap: 5px;
  }
  .transport span {
    width: 100%;
  }
  .game {
    padding-bottom: 0;
  }
  .global-controls {
    bottom: 10px;
    right: 10px;
  }
  .modal-shade {
    padding: 10px;
  }
  .modal {
    padding: 16px;
  }
  .modal-top {
    top: -16px;
  }
  .start-plate {
    top: 55%;
    padding: 10px 15px;
    white-space: nowrap;
  }
  .start-plate span {
    font-size: 10px;
  }
  .start {
    font-size: 20px;
    padding: 9px 38px;
  }
  .title-footer {
    bottom: 75px;
    left: 10px;
    right: 10px;
    text-align: center;
  }
  .picker {
    padding: 20px;
    margin: 30px auto;
  }
  .picker h1 {
    font-size: 32px;
  }
  .assignment-list {
    grid-template-columns: 1fr;
  }
  .title-art {
    height: auto;
    max-height: 100%;
    align-self: center;
  }
}
@media (max-width: 500px) {
  .title-screen .start-plate {
    top: 64%;
  }
  .start-plate p {
    font-size: 8px;
  }
  .title-screen .title-art {
    transform: translateY(-7vh);
  }
  .options {
    grid-template-columns: 1fr;
  }
  .resident-strip {
    flex-wrap: wrap;
    justify-content: center;
  }
  .resident-strip button {
    width: 21%;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 801px) {
  #town {
    max-height: calc(100svh - 350px);
  }
}
.actor {
  transition: transform 0.42s linear;
}
@media (max-width: 800px) {
  .transport {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 10px 58px;
  }
  .transport button {
    flex-shrink: 0;
  }
  .transport span {
    display: none;
  }
}
@media (min-width: 801px) and (max-height: 600px) {
  #town {
    max-height: none;
    min-height: 280px;
  }
  .map-panel {
    position: relative;
  }
  .desk {
    max-height: none;
  }
  .transport {
    position: sticky;
  }
  .workspace {
    align-items: start;
  }
}
