:root {
  color-scheme: dark;
  --ink: #f1e6cd;
  --muted: #c1bca8;
  --gold: #dec58d;
  --dark: #152620;
  --line: #526056;
  --paper: #eee5cf;
  --pencil: #303e32;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font:
    15px/1.6 Georgia,
    serif;
}
button,
a,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 13px;
  text-align: left;
}
button:hover {
  background: #33473b;
  border-color: var(--gold);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.65;
  cursor: default;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
}
h2 {
  font-size: 27px;
  font-weight: 400;
}
h3 {
  font-size: 21px;
  font-weight: 400;
}
p {
  margin: 12px 0;
}
.eyebrow,
.book-heading,
.tabs,
footer,
.vertical,
.monogram,
#room-count,
.tag {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
}
.eyebrow {
  color: var(--gold);
}
.game {
  display: flex;
  min-height: 100vh;
}
.rail {
  width: 76px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}
.monogram {
  color: var(--gold);
  text-decoration: none;
  font-family: Georgia;
  font-size: 24px;
  letter-spacing: -7px;
  padding-right: 7px;
  border: 1px solid var(--gold);
  width: 40px;
  height: 46px;
  text-align: center;
}
.monogram span {
  position: relative;
  top: 7px;
}
.vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--muted);
  margin: auto 0;
}
.rail button {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  text-align: center;
}
main {
  width: min(1420px, 100%);
  padding: 28px 42px 16px;
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
header .eyebrow {
  margin: 0 0 8px;
}
.quiet {
  font:
    12px system-ui,
    sans-serif;
  border-color: var(--line);
  color: var(--ink);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
  gap: 32px;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 15px;
}
#room-count {
  color: var(--muted);
  letter-spacing: 0;
}
.scene {
  border: 1px solid #88918055;
  aspect-ratio: 1.55;
  overflow: hidden;
  border-radius: 100px 100px 2px 2px;
  background: #33483d;
  position: relative;
}
.scene svg {
  width: 100%;
  height: 100%;
  display: block;
}
.scene .hotspot {
  cursor: pointer;
}
.scene .hotspot:hover .halo,
.scene .hotspot:focus .halo {
  fill: #f6dcaa;
  opacity: 0.7;
}
.scene .halo {
  fill: #ddc18a;
  opacity: 0.22;
  stroke: #ffe6b5;
  stroke-width: 2;
}
.scene text {
  font: 14px Georgia;
  fill: #fff4da;
  paint-order: stroke;
  stroke: #24382d;
  stroke-width: 5px;
  stroke-linejoin: round;
}
.scene .hotspot:focus {
  outline: none;
}
.room-description {
  color: var(--muted);
  font-style: italic;
  line-height: 1.65;
  min-height: 50px;
  margin: 15px 0;
}
.objects {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.objects button {
  font-size: 12px;
  padding: 7px 10px;
}
.objects .found {
  border-style: dashed;
  color: #d1c6a7;
}
#rooms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 19px;
}
#rooms button {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  padding: 10px;
}
#rooms .current {
  background: #dfcc9f;
  color: #26392e;
  border-color: #dfcc9f;
}
#rooms small {
  font: 10px system-ui;
}
.notebook {
  background: var(--paper);
  color: var(--pencil);
  box-shadow: 7px 8px 0 #0a181350;
  border-radius: 2px;
  min-height: 620px;
  padding: 22px 26px;
  position: relative;
}
.notebook:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  border-left: 1px solid #a7806950;
}
.notebook button {
  border-color: #a69c81;
  color: var(--pencil);
}
.notebook button:hover {
  background: #ddd1b5;
  border-color: #65765c;
}
.book-heading {
  display: flex;
  justify-content: space-between;
  letter-spacing: 1.5px;
  color: #58604e;
}
.tabs {
  display: flex;
  border-bottom: 1px solid #b8af96;
  margin: 17px 0 21px;
  letter-spacing: 0;
  gap: 8px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  padding: 9px 7px;
  font: 12px system-ui;
  color: #5d624f;
}
.tabs .selected {
  border-bottom: 2px solid #3d5140;
  color: #263b2a;
}
.tag {
  letter-spacing: 1px;
  color: #59624d;
  font-size: 9px;
}
.notebook p {
  font-size: 14px;
  line-height: 1.7;
}
.rule {
  border: 0;
  border-top: 1px solid #c0b59a;
  margin: 22px 0;
}
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 15px 0;
}
.portrait {
  width: 43px;
  height: 50px;
  background: #354a3b;
  color: #eadbb9;
  display: grid;
  place-items: center;
  border-radius: 22px 22px 2px 2px;
  font-size: 17px;
}
.person span:last-child {
  display: flex;
  flex-direction: column;
}
.person small {
  font: 11px system-ui;
  color: #62664f;
}
.topics {
  display: grid;
  gap: 6px;
}
.topics button {
  font-size: 13px;
}
.dialogue {
  border-left: 2px solid #6f7d60;
  padding: 2px 0 2px 14px;
  margin: 16px 0;
}
.evidence-card {
  border-bottom: 1px solid #c0b59a;
  padding: 13px 0;
}
.evidence-card button {
  border: 0;
  padding: 0;
  font-size: 16px;
  width: 100%;
}
.evidence-card p {
  font-size: 12px;
  margin: 6px 0;
}
.deduction {
  border: 1px solid #ada387;
  margin: 12px 0;
  padding: 13px;
}
.deduction.solved {
  background: #d9ddc5;
}
.deduction p {
  font-size: 12px;
}
.deduction button {
  font-size: 12px;
  width: 100%;
  margin: 3px 0;
}
.needed {
  color: #715435;
  font-size: 12px;
}
.feedback {
  font-size: 13px;
  color: #684026;
  padding: 10px 0;
}
.primary {
  background: #304b37 !important;
  color: #f4ead2 !important;
  border: 1px solid #304b37 !important;
  width: 100%;
  text-align: center;
  margin-top: 14px;
}
footer {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.2px;
}
dialog {
  border: 1px solid #b6a47a;
  border-radius: 4px;
  background: var(--paper);
  color: var(--pencil);
  max-width: 560px;
  width: calc(100% - 32px);
  padding: 30px;
  max-height: 88vh;
  overflow: auto;
}
dialog::backdrop {
  background: #06160ed9;
  backdrop-filter: blur(4px);
}
dialog button {
  border-color: #8e947a;
  color: var(--pencil);
}
dialog button:hover {
  background: #d7d0b7;
}
dialog h2 {
  line-height: 1.3;
}
dialog .close {
  margin-top: 20px;
  font-size: 12px;
}
dialog .actions {
  display: grid;
  gap: 8px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #e7d8b4;
  color: #253d2c;
  border: 1px solid #89937a;
  padding: 10px 18px;
  box-shadow: 0 4px 20px #0004;
  font-size: 13px;
  max-width: 90vw;
  display: none;
  z-index: 5;
}
input[type="file"] {
  display: block;
  max-width: 100%;
  margin: 12px 0;
}
.ending {
  border-top: 3px double #9b8c68;
  padding-top: 18px;
}
.finished {
  font-size: 24px;
  line-height: 1.4;
}
a {
  color: inherit;
}
@media (min-width: 1500px) {
  main {
    padding-top: 40px;
  }
  .scene {
    aspect-ratio: 1.55;
  }
}
@media (max-width: 1000px) {
  main {
    padding: 25px;
  }
  .workspace {
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.9fr);
  }
  .notebook {
    padding: 20px;
  }
  .rail {
    width: 56px;
  }
  h1 {
    font-size: 32px;
  }
}
@media (max-width: 760px) {
  .rail {
    display: none;
  }
  main {
    padding: 20px 16px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  header {
    margin-bottom: 24px;
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 25px;
  }
  .notebook {
    min-height: 450px;
    padding: 23px;
  }
  .scene {
    aspect-ratio: 1.45;
  }
  .room-description {
    min-height: 0;
  }
  #rooms {
    margin-top: 14px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .scene-heading {
    gap: 8px;
  }
  footer {
    font-size: 8px;
    gap: 12px;
  }
  .notebook p {
    font-size: 15px;
  }
  button {
    min-height: 40px;
  }
  .tabs button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .scene svg {
    animation: arrive 0.4s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0.5;
    }
    to {
      opacity: 1;
    }
  }
}

.header-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 400px) {
  .header-actions {
    flex-direction: column;
    gap: 4px;
  }
  .header-actions button {
    padding: 5px 10px;
    min-height: 34px;
  }
}

.timeline {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #c0b59a;
  font-size: 13px;
}
.timeline strong {
  font:
    12px/1.8 system-ui,
    sans-serif;
  color: #495940;
}
.notebook .source {
  display: block;
  padding: 4px 0;
  border: 0;
  font-size: 11px;
  text-decoration: underline;
}
.interview {
  margin: 20px 0;
}
.interview .recorded {
  display: block;
  border: 0;
  border-bottom: 1px solid #c0b59a;
  border-radius: 0;
  padding: 10px 0;
  width: 100%;
  font-size: 13px;
}
.contradiction {
  border-left: 2px solid #785536;
  padding-left: 12px;
  color: #654426;
}
.tabs {
  gap: 4px;
}
.tabs button {
  padding-left: 6px;
  padding-right: 6px;
}
@media (max-width: 400px) {
  .tabs button {
    font-size: 11px;
  }
  .timeline li {
    grid-template-columns: 75px 1fr;
    gap: 8px;
  }
}
