/* Layout: the map is the whole page. Everything else floats on it like an atlas plate: a cartouche top-left, story callouts pinned to places with leader lines, a key bottom-right, and the time bar along the bottom. Single deliberate look: a printed historical atlas. */
:root {
  --paper: #f5eedc;
  --paper-2: #ebe1c8;
  --ink: #2a2118;
  --ink-dim: #6b5d48;
  --route: #8e2a1c;
  --tekhelet: #2f5aa8;
  --ochre: #b8862b;
  --rule: rgba(42, 33, 24, 0.16);
  --f-label: "EB Garamond", Garamond, "Times New Roman", serif;
  --f-heb: "Frank Ruhl Libre", "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  background: #668eab;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 2px;
}
.map {
  position: fixed;
  inset: 0;
  cursor: grab;
  touch-action: none;
}
.map.drag {
  cursor: grabbing;
}
.map canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.vig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(245, 238, 220, 0) 55%, rgba(120, 100, 70, 0.26) 100%);
}
.head {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}
.head .veh {
  position: absolute;
  left: 0;
  top: 0;
  width: 58px;
  height: 42px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
}
.head .veh svg {
  width: 100%;
  height: 100%;
  display: block;
}
.head.moving i {
  width: 12px;
  height: 12px;
  left: -6px;
  top: -6px;
  background: #8e2a1c;
  animation: none;
}
.head i {
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(142, 42, 28, 0.2);
  animation: pulse 1.6s ease-in-out infinite;
}
.head::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8e2a1c;
  box-shadow: 0 0 0 2px #f5eedc;
}
.head[hidden] {
  display: none;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.4;
  }
}

.plate {
  background: rgba(245, 238, 220, 0.94);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 10px 30px -12px rgba(42, 33, 24, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* cartouche */
.cartouche {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px;
  width: min(23rem, calc(100% - 32px));
  border-radius: 3px;
  padding: 0.95rem 1.1rem 0.9rem;
  outline: 1px solid rgba(42, 33, 24, 0.22);
  outline-offset: -5px;
}
.c-top {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.mark {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-dim);
}
.era {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--route);
  white-space: nowrap;
}
.c-title {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 1.95rem;
  line-height: 1.02;
  margin: 0.2rem 0 0.55rem;
  text-wrap: balance;
}
.sure {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
}
.meter {
  height: 5px;
  border-radius: 3px;
  background: rgba(42, 33, 24, 0.12);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--route);
  transition: width 0.4s;
}
.pct {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.why {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
}
.stats {
  display: flex;
  gap: 1.1rem;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}
.stats div {
  display: grid;
}
.stats span {
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}
.stats b {
  font-weight: 500;
  font-size: 0.82rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.t-tradition {
  color: #8a6a2a;
  border-style: dotted;
}
.t-record {
  color: var(--route);
}
.t-family {
  color: #7a4a1c;
}
.t-dna {
  color: var(--tekhelet);
}
.t-assumption {
  color: #6b45c0;
  border-style: dashed;
}

/* tools */
.tools {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  display: flex;
  gap: 0.45rem;
}
.tool {
  height: 38px;
  min-width: 38px;
  padding: 0 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.tool:hover {
  background: var(--paper);
}
.tool.accent {
  color: var(--route);
}

/* callout */
.callout {
  position: fixed;
  left: 0;
  top: 0;
  width: min(20rem, calc(100vw - 32px));
  max-height: min(54vh, 31rem);
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  will-change: transform;
}
.callout[hidden] {
  display: none !important;
}
.callout.min .co-body {
  display: none;
}
.callout.min {
  cursor: pointer;
}
.callout.min .co-head {
  padding-bottom: 0.75rem;
}
.callout.min .co-head h3 {
  font-size: 1.1rem;
}
.callout.min .x {
  display: none;
}
.callout.min .co-kicker::after {
  content: " · tap to open";
}
.callout.gone {
  pointer-events: none;
}

/* the dive: the city opens as a gallery you walk through */
.map {
  z-index: 1;
}
.cartouche,
.tools,
.timebar {
  z-index: 5;
}
.tip {
  z-index: 6;
}
.scene {
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #3a2d1f 0%, #1d1610 60%, #0f0b07 100%);
  color: var(--paper);
  overflow: hidden;
}
.scene.live {
  pointer-events: auto;
}
.film {
  position: absolute;
  inset: 0;
}
.film canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.slate {
  position: absolute;
  left: 50%;
  top: 7%;
  transform: translateX(-50%);
  width: min(44rem, calc(100% - 32px));
  text-align: center;
}
.kick {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d9b77a;
}
.sline {
  font-family: var(--f-label);
  font-style: italic;
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
  line-height: 1.25;
  margin: 0.4rem 0 0.5rem;
  color: #f1e6cf;
  text-wrap: balance;
}
.slot {
  display: block;
  color: rgba(217, 183, 122, 0.55);
}
.strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 25%;
  bottom: 150px;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 max(16px, calc(50vw - 11rem));
  scrollbar-width: none;
}
.strip::-webkit-scrollbar {
  display: none;
}
.room {
  flex: none;
  width: 21rem;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(245, 238, 220, 0.97);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
  outline: 1px solid rgba(42, 33, 24, 0.2);
  outline-offset: -6px;
  overflow: hidden;
}
.room.wide {
  width: min(40rem, calc(100vw - 32px));
}
.room-in {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.15rem 1.25rem 1.2rem;
  overscroll-behavior: contain;
}
.room .kick {
  color: var(--route);
}
.room h2 {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.05;
  margin: 0.25rem 0 0.6rem;
  text-wrap: balance;
}
.room h2.big {
  font-size: 2.5rem;
}
.room p {
  margin: 0 0 0.7rem;
  font-size: 0.93rem;
}
.room .yrbig {
  font-family: var(--f-mono);
  font-size: 2.2rem;
  color: var(--route);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.walk {
  position: absolute;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241, 230, 207, 0.7);
  white-space: nowrap;
}
.walk i {
  display: block;
  width: 8rem;
  height: 2px;
  background: rgba(241, 230, 207, 0.2);
}
.walk b {
  display: block;
  height: 100%;
  width: 100%;
  background: #d9b77a;
  transform-origin: 0 0;
  transform: scaleX(0);
}
.tree {
  position: relative;
  display: grid;
  gap: 1.4rem;
  margin-top: 0.4rem;
}
.tree .links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.gen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.portrait {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 7rem;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  font: inherit;
  color: inherit;
}
.oval {
  width: 4.8rem;
  height: 6rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #c9ad84, #8a6a44 70%, #5d4429);
  border: 3px solid #f5eedc;
  outline: 1.5px solid #8a6a44;
  display: grid;
  place-items: center;
  font-family: var(--f-label);
  font-size: 1.5rem;
  color: #f5eedc;
  box-shadow: 0 6px 14px -6px rgba(42, 33, 24, 0.6);
  transition: transform 0.2s;
}
.portrait:hover .oval,
.portrait[aria-pressed="true"] .oval {
  transform: translateY(-3px);
  outline-color: var(--route);
}
.portrait b {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.1;
}
.portrait small {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--ink-dim);
}
.portrait.example .oval {
  background: repeating-linear-gradient(45deg, #e7dcc2 0 6px, #ddd0b1 6px 12px);
  color: #8a6a44;
  border-style: dashed;
}
.note {
  font-size: 0.84rem;
  color: var(--ink-dim);
}
.pdetail {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
}
.pdetail h3 {
  margin: 0 0 0.2rem;
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 1.25rem;
}

.co-head,
.co-body {
  transition: opacity 0.22s ease;
}
.callout.swap .co-head,
.callout.swap .co-body {
  opacity: 0;
}
.co-head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem 0.5rem;
}
.co-head h3 {
  margin: 0;
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.1;
  flex: 1;
  text-wrap: balance;
}
.co-kicker {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--route);
  display: block;
  margin-bottom: 0.2rem;
}
.x {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.3rem;
  color: var(--ink-dim);
}
.co-body {
  overflow: auto;
  padding: 0 1rem 0.95rem;
  font-size: 0.9rem;
}
.co-body p {
  margin: 0 0 0.65rem;
}
.lbl {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0.75rem 0 0.2rem;
}
.felt {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 1.06rem;
  line-height: 1.45;
}
.dna b {
  color: var(--tekhelet);
  font-weight: 600;
}
.lang {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.7rem;
}
.script {
  font-family: var(--f-heb);
  font-size: 1.45rem;
  line-height: 1.15;
}
.tr {
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.btn {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: 0.28rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn:hover {
  border-color: var(--route);
  color: var(--route);
}
.btn.solid {
  background: var(--route);
  border-color: var(--route);
  color: #fbf5e8;
  font-weight: 600;
}
.btn.solid:hover {
  color: #fff;
}
.qs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ans {
  white-space: pre-wrap;
  line-height: 1.55;
}
.ans.wait {
  color: var(--ink-dim);
  font-style: italic;
}
.ask {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.ph {
  margin: 0.55rem 0 0.4rem;
}
.ph img {
  display: block;
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
  border-radius: 2px;
  background: #d9cdb4;
}
.ph figcaption {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-dim);
  margin-top: 0.3rem;
}
.ph figcaption a {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  opacity: 0.8;
  margin-top: 0.1rem;
  text-decoration: none;
}
.gw {
  all: unset;
  cursor: help;
  border-bottom: 1.5px dotted currentColor;
  color: inherit;
}
.gw:hover,
.gw:focus-visible,
.gw[aria-expanded="true"] {
  color: var(--route);
  border-bottom-style: solid;
}
.gd {
  display: block;
  margin: 0.3rem 0 0.45rem;
  padding: 0.4rem 0.6rem;
  border-left: 3px solid var(--route);
  background: rgba(163, 48, 31, 0.06);
  font-size: 0.82rem;
  line-height: 1.4;
  font-style: normal;
  color: var(--ink);
}
.whyhere {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.legend {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--ink-dim);
  margin: 0.6rem 0 0;
}
.lyrics p {
  margin: 0.15rem 0;
  font-family: var(--f-label);
  font-size: 1rem;
  line-height: 1.4;
}
.sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 760px) {
  .sides {
    grid-template-columns: 1fr;
  }
}
.fline {
  border-top: 1px solid var(--rule);
  padding: 0.35rem 0;
}
.fline summary {
  cursor: pointer;
  font-family: var(--f-label);
  font-size: 1.02rem;
}
.fline summary small {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  color: var(--ink-dim);
  margin-left: 0.3rem;
}
.fline ul,
.famlist {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.fr {
  font-size: 0.84rem;
  line-height: 1.3;
}
.fr .yrs {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  color: var(--ink-dim);
}
.fr .rel {
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin: 0.1rem 0 0.2rem;
}
.fr .basis {
  font-size: 0.74rem;
  color: var(--ink-dim);
  margin-top: 0.2rem;
}
.gchip {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 99px;
  padding: 0.05rem 0.4rem;
}
.l3.thlbl {
  display: grid;
  transform: translate(-50%, -140%);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.l3.thlbl b {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 3px #000;
}
.l3.thlbl span {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e9c98d;
  text-shadow: 0 1px 3px #000;
}
.dnl {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
  display: grid;
  gap: 0.45rem;
}
.dn {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.3;
}
.dn > i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.2rem;
}
.dn.rej b {
  text-decoration: line-through;
}
.dn .yrs {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
}
.dn .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.g2 {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: 0.08rem 0.4rem;
}
.dim {
  color: var(--ink-dim);
}
.tribes {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem 0.6rem;
  font-family: var(--f-label);
  font-size: 1rem;
}
.tribes li.ours {
  color: var(--route);
  font-weight: 600;
}
.ask input:focus {
  outline: 2px solid var(--route);
  outline-offset: 1px;
  background: #fff;
}
.ask input::placeholder {
  color: #8a7a62;
  font-style: italic;
}
.tabhint {
  margin: 0.35rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
}
.tabhint kbd {
  font-size: 0.6rem;
}
.qs.next {
  margin-top: 0.7rem;
}
.ask input {
  flex: 1;
  min-width: 0;
  background: #fffaf0;
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.bmd {
  list-style: none;
  margin: 0.2rem 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.bmd li {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.4rem;
}
.bmd span {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 0.2rem;
}
.kin {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.form {
  display: grid;
  gap: 0.55rem;
}
.form label {
  display: grid;
  gap: 0.15rem;
  font-size: 0.74rem;
  color: var(--ink-dim);
}
.form input,
.form select {
  background: #fffaf0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.4rem 0.5rem;
  font-size: 0.86rem;
  color: var(--ink);
  min-width: 0;
}
.row2 {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.4rem;
}
.status {
  font-size: 0.8rem;
  color: var(--ink-dim);
  min-height: 1.2em;
}

/* key (lives inside the time bar) */
.key {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--rule);
  font-size: 0.72rem;
  color: var(--ink-dim);
}
.key span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.key .kh {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink);
}
.key svg {
  width: 30px;
  height: 11px;
  flex: none;
}
.key svg[viewBox^="0 0 14"] {
  width: 13px;
}
.scale {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  gap: 0.45rem !important;
}
.scale i {
  display: block;
  height: 5px;
  border: 1px solid var(--ink);
  border-top: 0;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}
.scale b {
  font-weight: 400;
}

/* time bar */
.timebar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(64rem, calc(100% - 32px));
  border-radius: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding: 0.55rem 0.9rem 0.55rem;
}
.play {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--route);
  background: none;
  color: var(--route);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}
.track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 38px;
  cursor: pointer;
  touch-action: none;
}
.segs {
  position: absolute;
  inset: 9px 0 auto;
  display: flex;
  gap: 3px;
}
.segs div {
  height: 5px;
  border-radius: 3px;
  background: rgba(42, 33, 24, 0.14);
  position: relative;
}
.segs span {
  position: absolute;
  top: 9px;
  left: 0;
  font-family: var(--f-label);
  font-size: 0.84rem;
  color: var(--ink-dim);
  white-space: nowrap;
}
.segs span.cur {
  color: var(--ink);
  font-weight: 500;
}
.fill {
  position: absolute;
  top: 9px;
  left: 0;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: var(--route);
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}
.handle {
  position: absolute;
  top: 4px;
  left: -7.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--route);
  pointer-events: none;
  will-change: transform;
}
.yr {
  font-family: var(--f-mono);
  font-size: 0.95rem;
  color: var(--route);
  min-width: 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tip {
  position: fixed;
  pointer-events: none;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  border-radius: 3px;
  max-width: 16rem;
  transform: translate(-50%, calc(-100% - 14px));
}
.tip[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .cartouche {
    padding: 0.7rem 0.85rem;
    width: calc(100% - 32px);
  }
  .c-title {
    font-size: 1.45rem;
    margin: 0.1rem 0 0.4rem;
  }
  .why,
  .stats {
    display: none;
  }
  .tools {
    top: auto;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }
  .timebar:has(.key.open) {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .key {
    display: none;
  }
  .key.open {
    display: flex;
  }
  .callout {
    left: 16px !important;
    top: auto !important;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    transform: none !important;
    width: calc(100vw - 32px);
    max-height: 40vh;
  }
  .strip {
    top: 24%;
    bottom: 104px;
    padding: 0 9vw;
    gap: 0.8rem;
  }
  .room {
    width: 82vw;
  }
  .walk {
    bottom: 84px;
  }
  .slate {
    top: 9%;
  }
  .slot {
    display: none;
  }
  .segs span {
    display: none;
  }
  .segs span.cur {
    display: block;
  }
  .yr {
    min-width: auto;
    font-size: 0.82rem;
  }
  .timebar {
    gap: 0.6rem;
  }
}
@media (min-width: 761px) {
  #keyBtn {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .meter i {
    transition: none;
  }
  .head i {
    animation: none;
  }
}
/* 3D world */
.map {
  background: #05070c;
  touch-action: none;
}
.map #gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.vig {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.3) 100%) !important;
}
#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.l3 {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.l3.town {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -0.62em 0 0 -4px;
  font-family: var(--f-label);
  font-size: 16px;
  color: #f5eedc;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}
.l3.town i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5eedc;
  box-shadow: 0 0 0 2px rgba(20, 14, 8, 0.55);
  flex: none;
}
.l3.town.cur {
  font-size: 19px;
  font-weight: 500;
}
.l3.region,
.l3.sea {
  white-space: nowrap;
}
.l3.region b,
.l3.sea b {
  display: block;
  transform: translate(-50%, -50%);
  font-weight: 400;
  font-family: var(--f-label);
}
.l3.region b {
  font-size: 15px;
  letter-spacing: 0.34em;
  color: rgba(245, 238, 220, 0.82);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}
.l3.sea b {
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.06em;
  color: rgba(200, 222, 255, 0.85);
  text-shadow: 0 1px 5px rgba(0, 20, 60, 0.8);
}
.l3.pin {
  width: 28px;
  height: 28px;
  margin-top: -40px;
  border-radius: 50%;
  border: 1.5px solid #2a2118;
  background: #f5eedc;
  color: #8e2a1c;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.l3.pin:hover {
  background: #8e2a1c;
  color: #f5eedc;
}
.l3.fam {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: #b8862b;
  border: 2px solid #f5eedc;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.prologue {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: min(52rem, 100%);
  box-sizing: border-box;
  padding: 0 max(16px, 7vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(
    90deg,
    rgba(5, 7, 12, 0.96) 0%,
    rgba(5, 7, 12, 0.9) 52%,
    rgba(5, 7, 12, 0.55) 78%,
    rgba(5, 7, 12, 0) 100%
  );
  text-align: left;
  color: #f5eedc;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.prologue .pk {
  margin: 0 0 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e9c98d;
}
.prologue .pt {
  margin: 0;
  font-family: var(--f-label);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.95;
  text-wrap: balance;
}
.prologue .pt em {
  color: #e9a07a;
}
.prologue .big70 {
  color: #e9a07a;
  font-variant-numeric: lining-nums;
}
.prologue .pkeys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 1.4rem 0 0;
  font-size: 0.92rem;
  color: rgba(245, 238, 220, 0.88);
}
.prologue .pkeys span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.prologue kbd {
  background: rgba(245, 238, 220, 0.1);
  color: #f5eedc;
  border-color: rgba(245, 238, 220, 0.4);
}
.prologue .ps {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(245, 238, 220, 0.92);
  max-width: 30rem;
}
.prologue > * {
  max-width: 34rem;
}
@media (max-width: 760px) {
  .prologue {
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 5rem 16px calc(32px + env(safe-area-inset-bottom, 0px));
    justify-content: flex-end;
    background: linear-gradient(
      0deg,
      rgba(5, 7, 12, 0.97) 0%,
      rgba(5, 7, 12, 0.9) 65%,
      rgba(5, 7, 12, 0) 100%
    );
  }
}

.c-place {
  margin: -0.2rem 0 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--route);
  min-height: 1em;
}
.c-keys {
  margin: 0.6rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.74rem;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  transition: opacity 0.6s;
}
.c-keys.off {
  opacity: 0.55;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.3em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--ink);
  background: var(--paper);
}
.strip {
  overflow: hidden !important;
  padding: 0 !important;
  display: block !important;
}
.rail2 {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: 100%;
  will-change: transform;
  transition: none;
}
.rail2 .room {
  transition:
    opacity 0.35s,
    transform 0.35s;
  opacity: 0.38;
  transform: scale(0.94);
}
.rail2 .room.on {
  opacity: 1;
  transform: none;
}
.walk {
  gap: 1.2rem !important;
}
.walk .wk {
  color: rgba(241, 230, 207, 0.55);
}
.walk kbd {
  background: transparent;
  color: #f1e6cf;
  border-color: rgba(241, 230, 207, 0.35);
}
.l3.place {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -14px 0 0 -14px;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  font-family: var(--f-label);
  font-size: 17px;
  color: #f5eedc;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}
.l3.place b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5eedc;
  color: #8e2a1c;
  border: 1.5px solid #2a2118;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  flex: none;
}
.l3.place.past {
  font-size: 13px;
  opacity: 0.85;
}
.l3.place.past b {
  width: 20px;
  height: 20px;
  font-size: 10px;
  background: rgba(245, 238, 220, 0.75);
}
.l3.place.past span {
  color: rgba(245, 238, 220, 0.8);
}
.l3.place.cur b {
  background: #8e2a1c;
  color: #f5eedc;
  border-color: #f5eedc;
}
.l3.place.cur {
  font-size: 20px;
  font-weight: 500;
}
@media (max-width: 760px) {
  .c-keys {
    display: none;
  }
  .walk .wk {
    display: none;
  }
}

.anc svg {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0.4rem auto 0.2rem;
}
.nums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.6rem 0 0.9rem;
}
.nums div {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.nums b {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--route);
  font-variant-numeric: tabular-nums;
}
.nums span {
  font-size: 0.78rem;
  color: var(--ink-dim);
  line-height: 1.35;
}
@media (max-width: 760px) {
  .nums {
    grid-template-columns: 1fr;
  }
}
.scene {
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 6, 0.5) 0%,
    rgba(12, 9, 6, 0) 20%,
    rgba(12, 9, 6, 0) 55%,
    rgba(12, 9, 6, 0.35) 85%,
    rgba(12, 9, 6, 0.55) 100%
  ) !important;
}
.scene .slate {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  width: auto !important;
  padding: 16px 24px 2.4rem !important;
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 6, 0.78) 0%,
    rgba(12, 9, 6, 0.55) 60%,
    rgba(12, 9, 6, 0) 100%
  );
}
.scene .slate > * {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}
.scene .slot {
  display: none;
}
.smodel {
  margin: 0.3rem auto 0;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(233, 201, 141, 0.8);
}
.smodel:empty {
  display: none;
}
.sroad {
  margin: 0.35rem auto 0;
  max-width: 40rem;
  font-family: var(--f-label);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
  color: rgba(245, 238, 220, 0.85);
}
.sroad span {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e9c98d;
  margin-right: 0.4rem;
}
.scene .sline {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.strip {
  top: auto !important;
  bottom: 64px !important;
  height: min(50vh, 27rem) !important;
}
.rail2 {
  align-items: flex-end !important;
  padding-bottom: 4px;
}
.rail2 .room {
  width: 19.5rem;
  max-height: 100%;
  cursor: pointer;
  transition:
    opacity 0.35s,
    transform 0.35s,
    width 0.35s;
}
.rail2 .room.wide {
  width: min(34rem, 86vw);
}
.rail2 .room.on {
  outline: 2px solid #e9c98d;
  outline-offset: 3px;
}
.rail2 .room.open {
  width: min(46rem, 92vw);
  cursor: default;
}
.room .more {
  display: none;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}
.room.open .more {
  display: block;
}
.room .enter {
  display: none;
  margin: 0.8rem 0 0;
  font-size: 0.74rem;
  color: var(--ink-dim);
  align-items: center;
  gap: 0.4rem;
}
.room.on .enter {
  display: flex;
}
.room .enter .c {
  display: none;
}
.room.open .enter .o {
  display: none;
}
.room.open .enter .c {
  display: inline;
}
.walk {
  bottom: 22px !important;
}
@media (max-width: 760px) {
  .strip {
    height: min(56vh, 30rem) !important;
    bottom: 48px !important;
  }
  .rail2 .room {
    width: 80vw;
  }
  .rail2 .room.open {
    width: 92vw;
  }
}
.road {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  transform: none !important;
  width: auto !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 6, 0.78) 0%,
    rgba(12, 9, 6, 0.55) 60%,
    rgba(12, 9, 6, 0) 100%
  ) !important;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 24px 2.2rem calc(min(23rem, 100vw) + 40px) !important;
  transform: translateX(-50%);
  z-index: 4;
  width: min(40rem, calc(100% - 32px));
  text-align: center;
  pointer-events: none;
  opacity: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 1rem;
  background: rgba(12, 9, 6, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 3px;
}
.road > * {
  max-width: 44rem;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .road {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
.road .rk {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e9c98d;
}
.road .rt {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.35;
  color: #f5eedc;
}
.scale {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  display: grid;
  gap: 3px;
  pointer-events: none;
  font: 11px/1.2 var(--f-mono);
  letter-spacing: 0.06em;
  color: #f5eedc;
  text-shadow: 0 1px 3px #000;
}
.scale i {
  display: block;
  height: 6px;
  border: 2px solid #f5eedc;
  border-top: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.l3.dnalbl {
  display: grid;
  justify-items: center;
  transform-origin: 0 0;
}
.l3.dnalbl b,
.l3.dnalbl span {
  transform: translateX(-50%);
  white-space: nowrap;
  /* a dark backing so the words stay readable over bright desert and snow */
  background: rgba(8, 7, 6, 0.66);
  padding: 1px 6px;
  border-radius: 3px;
  text-shadow:
    0 1px 3px #000,
    0 0 8px rgba(0, 0, 0, 0.6);
}
.l3.dnalbl b {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: 14px;
  color: #eef3ff;
}
.l3.dnalbl span {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.l3.recon.temple {
  max-width: 19rem;
}
.l3.recon.temple span {
  color: #f3c96a;
  font-size: 15px;
}
.l3.recon.temple i {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--f-label);
  font-size: 13px;
  line-height: 1.35;
  color: #f5eedc;
}
.l3.recon {
  display: grid;
  gap: 3px;
  transform-origin: 0 0;
  max-width: 15rem;
  margin-left: 0;
  margin-top: -1.5rem;
  text-align: left;
  pointer-events: none;
  background: rgba(12, 9, 6, 0.8);
  border-left: 3px solid #e9c98d;
  padding: 0.45rem 0.65rem;
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.l3.recon span {
  font-family: var(--f-label);
  font-size: 14px;
  line-height: 1.25;
  color: #fff;
}
.l3.recon i {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e9c98d;
}
.l3.modern b {
  display: block;
  transform: translate(-50%, -50%);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.l3.vil {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: -0.6em 0 0 -3px;
  font-family: var(--f-ui, system-ui);
  font-size: 12px;
  color: #fff;
  text-shadow:
    0 1px 2px #000,
    0 0 6px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.l3.vil i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.6);
  flex: none;
}
.tl {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 26px;
  z-index: 6;
  background: rgba(12, 9, 6, 0.82);
  border-bottom: 1px solid rgba(233, 201, 141, 0.25);
}
.tls {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 0;
  border-right: 1px solid rgba(233, 201, 141, 0.18);
  background: none;
  color: rgba(245, 238, 220, 0.6);
  font: 10px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 4px;
  overflow: hidden;
  white-space: nowrap;
}
.tls em {
  font-style: normal;
  opacity: 0.6;
}
.tls.on {
  color: #f5eedc;
  background: rgba(233, 201, 141, 0.12);
}
.tls:hover {
  color: #f5eedc;
}
.tlnow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1px;
  background: #e9c98d;
  box-shadow: 0 0 8px #e9c98d;
  transition: left 0.3s linear;
}
@media (max-width: 760px) {
  .tls em {
    display: none;
  }
}
.cartouche {
  top: calc(36px + env(safe-area-inset-top, 0px)) !important;
}
.road {
  padding-top: calc(40px + env(safe-area-inset-top, 0px)) !important;
}
.scene .slate {
  padding-top: 38px !important;
}
.edgehint {
  position: fixed;
  left: 50%;
  bottom: 52px;
  transform: translate(-50%, 8px);
  z-index: 7;
  background: rgba(12, 9, 6, 0.88);
  color: #f5eedc;
  font: 11px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.9rem;
  border-radius: 99px;
  border: 1px solid rgba(233, 201, 141, 0.4);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  white-space: nowrap;
}
.edgehint.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.song {
  position: fixed;
  left: 16px;
  bottom: 40px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(30rem, calc(100vw - 32px));
  background: rgba(12, 9, 6, 0.82);
  border: 1px solid rgba(233, 201, 141, 0.35);
  border-radius: 99px;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  color: #f5eedc;
}
.song > button {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #e9c98d;
  color: #2a2118;
  font-size: 13px;
  cursor: pointer;
}
.song .si {
  display: grid;
  min-width: 0;
  gap: 2px;
  cursor: pointer;
}
.song .si b {
  font: 600 10px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e9c98d;
}
.song .si span {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song.on .si span {
  white-space: normal;
}
.sbar {
  display: block;
  height: 2px;
  background: rgba(245, 238, 220, 0.18);
  margin-top: 2px;
}
.sbar i {
  display: block;
  height: 100%;
  width: 0;
  background: #e9c98d;
}
.sfly {
  flex: none;
  font: 10px/1.2 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 238, 220, 0.7);
  display: flex;
  gap: 0.3rem;
  align-items: center;
  cursor: pointer;
}
@media (max-width: 760px) {
  .sfly {
    display: none;
  }
  .song {
    bottom: auto;
    top: 34px;
    left: auto;
    right: 12px;
    max-width: 62vw;
  }
}
.psong {
  margin: 0.9rem 0 0.4rem;
  pointer-events: auto;
}
.psong .btn {
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
}
.scale {
  bottom: 14px !important;
}
.credit {
  position: fixed;
  right: 12px;
  bottom: 8px;
  z-index: 5;
  font: 10px/1.4 var(--f-mono);
  letter-spacing: 0.06em;
  color: rgba(245, 238, 220, 0.55);
  text-align: right;
}
.credit summary {
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  padding: 2px 4px;
}
.credit summary::-webkit-details-marker {
  display: none;
}
.credit[open] summary {
  color: #f5eedc;
}
.credit p {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: min(26rem, calc(100vw - 24px));
  margin: 0;
  padding: 0.6rem 0.75rem;
  background: rgba(12, 9, 6, 0.86);
  border-radius: 3px;
  color: #e9dfc8;
  text-align: left;
}
.credit a {
  color: inherit;
}
#loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5eedc;
  text-align: center;
  max-width: 80vw;
}
/* "How we counted": a small note that opens in place */
.how {
  margin-top: 0.6rem;
  pointer-events: auto;
}
.how summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  border-bottom: 1px dotted currentColor;
}
.how summary::-webkit-details-marker {
  display: none;
}
.how p {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
.prologue .how {
  max-width: 30rem;
  color: rgba(245, 238, 220, 0.92);
}
.prologue .how p {
  font-size: 0.85rem;
  line-height: 1.5;
}
.c-how {
  margin-top: 0.45rem;
  color: var(--ink-dim);
}
.c-how summary {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}
.c-how p {
  font-size: 0.8rem;
  color: var(--ink);
}
@media (max-width: 760px) {
  .c-how {
    display: none;
  }
}
/* an opened card is wide: keep its bottom edge clear of the song player (bottom-left) */
@media (min-width: 761px) {
  .rail2 .room.open {
    max-height: calc(100% - 30px);
    margin-bottom: 30px; /* cards sit on the strip's bottom edge (align-items: flex-end) */
  }
}
/* the fade used when the timeline jumps straight to another era (above the map and cards, below the top bar) */
#jumpfade {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: #05070c;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
#jumpfade {
  display: flex;
  align-items: center;
  justify-content: center;
}
#jumpfade span {
  font-family: var(--f-label);
  font-style: italic;
  font-size: 1.6rem;
  color: rgba(245, 238, 220, 0.85);
}
#jumpfade.on {
  opacity: 1;
  transition: opacity 0.25s;
}
/* phones: the song player is a slim "now playing" bar along the bottom, clear of the titles at the top;
   the cards, card counter, scale, "Map sources" and the front-page keys move up to make room for it */
@media (max-width: 760px) {
  .song {
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 8px;
    max-width: none;
    border-radius: 24px;
  }
  .song .si {
    flex: 1;
  }
  .song.on .si span {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .sfly {
    display: flex;
    width: 5.6rem;
    font-size: 9px;
  }
  .strip {
    bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important;
    /* shorter rather than higher, so the cards never hide the place's numbered circle */
    height: calc(min(56vh, 30rem) - 60px) !important;
  }
  .walk {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .credit {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .scale {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* on the front page the scale means nothing and would sit behind the keys */
  body:has(#prologue:not([style*="hidden"])) .scale {
    opacity: 0 !important;
  }
  .prologue {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .prologue .ps {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.7rem;
  }
}
/* ---------- the family tree (generations as columns) and the generation ladder ---------- */
.pedwrap {
  overflow-x: auto;
  margin: 0.4rem 0 0.6rem;
  overscroll-behavior-x: contain;
}
.ped {
  position: relative;
  font-family: var(--f-body, inherit);
}
.ped svg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.ped path {
  fill: none;
  stroke: rgba(42, 33, 24, 0.35);
  stroke-width: 1.2;
}
.ped path.weak {
  stroke-dasharray: 3 3;
}
.ped path.on {
  stroke: #b8862b;
  stroke-width: 2.6;
}
.ped .th {
  position: absolute;
  top: 0;
  display: grid;
  font: 600 9px/1.2 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.ped .th small {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.ped .th.lit {
  color: #9a6a12;
}
.ped .tside {
  position: absolute;
  left: 0;
  transform: translateY(-100%);
  font: italic 11px/1 var(--f-label);
  color: var(--ink-dim);
}
.pb {
  position: absolute;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 3px 6px;
  text-align: left;
  border: 1px solid rgba(42, 33, 24, 0.25);
  border-radius: 4px;
  background: #fbf7ec;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s;
}
.pb.m {
  border-left: 3px solid #b35d3d;
}
.pb.t {
  border-left: 3px solid #3d6fb3;
}
.pb b {
  font-size: 10.5px;
  line-height: 1.15;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pb small {
  font-size: 9px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb.weak {
  border-style: dashed;
}
.pb.dim {
  opacity: 0.38;
}
.pb.path {
  border-color: #b8862b;
}
.pb.here {
  background: #f3d98f;
  border-color: #9a6a12;
  box-shadow: 0 0 0 2px rgba(184, 134, 43, 0.45);
}
.pb.sel {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  opacity: 1;
}
.pedinfo {
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin-bottom: 1rem;
  min-height: 1.4em;
}
.pedinfo .rel,
.pedinfo .basis {
  color: var(--ink);
}
.ladder {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  font-size: 0.8rem;
}
.ladder li {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 3px 6px;
  border-left: 3px solid rgba(42, 33, 24, 0.15);
  color: var(--ink-dim);
}
.ladder li.lit {
  border-left-color: #b8862b;
  background: rgba(243, 217, 143, 0.55);
  color: var(--ink);
}
.ladder .rung small {
  font-size: 0.7rem;
  opacity: 0.8;
}
.ladder .who i {
  font-style: normal;
  letter-spacing: 0.15em;
  opacity: 0.5;
}
@media (max-width: 760px) {
  .ladder li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
/* key badges: a small black-and-white key showing what to press (hidden on touch screens) */
.kc {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 0.2em;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  background: #111;
  color: #fff;
  font: 600 10px/1 var(--f-mono);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  vertical-align: middle;
}
@media (hover: none) {
  .kc {
    display: none !important;
  }
}
.tls .kc {
  margin-right: 0.35em;
  font-size: 8px;
  opacity: 0.75;
}
.song .sk {
  /* the key badge sits on the pill's top-right corner, half over its edge */
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(35%, -45%);
  margin: 0;
}
/* the family's nearby towns on the map: quiet until you are at their main city */
.l3.side {
  opacity: 0.9;
}
.l3.side .kc {
  margin-right: 0.35em;
}
.l3.side:not(.on):not(.cur) .kc {
  background: #333;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ccc;
}
/* the "towns nearby" card */
.nearlist {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.near {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(42, 33, 24, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.near:hover {
  border-color: #b8862b;
}
.near .kc {
  margin-top: 0.1rem;
}
.near small {
  color: var(--ink-dim);
}
/* the song player, quieter: a small pill while idle (▶ Our song · P); while playing, just the current lyric
   on one line. "Fly with the song" shows while playing or when the player is hovered or focused. */
.song {
  gap: 0.45rem;
  padding: 0.22rem 0.75rem 0.22rem 0.25rem;
  max-width: min(24rem, calc(100vw - 32px));
  background: rgba(12, 9, 6, 0.6);
  border-color: rgba(233, 201, 141, 0.22);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.song:hover,
.song:focus-within,
.song.on {
  opacity: 1;
}
.song > button {
  width: 26px;
  height: 26px;
  font-size: 10px;
}
.song .si b {
  font-size: 9px;
}
.song:not(.on) .si span,
.song:not(.on) .sbar {
  display: none;
}
.song.on .si span {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song:not(.on):not(:hover):not(:focus-within) .sfly {
  display: none;
}
/* distances are given in each trip's note, so the scale bar is not needed */
.scale {
  display: none !important;
}
@media (max-width: 760px) {
  .song:not(.on) {
    right: auto;
  }
  .song.on .si span {
    white-space: normal;
  }
}
/* the Jewish year under our year */
.stats small.jy {
  font-size: 0.6rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.room .jyr {
  font: 0.72rem/1.2 var(--f-mono);
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-bottom: 0.4rem;
}
.song .si b {
  white-space: nowrap;
}

/* the place header's small labels: the gold was unreadable over bright ground, so a light version of the
   place-marker red on a darker band */
.scene .slate {
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 6, 0.86) 0%,
    rgba(12, 9, 6, 0.66) 65%,
    rgba(12, 9, 6, 0) 100%
  );
}
.scene .slate .kick,
.sroad span,
.smodel {
  color: #ff9a80;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6);
}
.sroad {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.scene.cart-on .slate {
  padding-left: calc(min(23rem, 30vw) + 40px) !important;
}

/* ---------- family profiles: the "their stories" card and the profile panel ---------- */
.ppl {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.pbtn {
  display: block;
  text-align: left;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--route);
  border-radius: 4px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.pbtn.t {
  border-left-color: var(--tekhelet);
}
.pbtn:hover,
.pbtn:focus-visible {
  background: #fff;
}
.pbtn b {
  font-family: var(--f-label);
  font-size: 1.05rem;
}
.pbtn small {
  color: var(--ink-dim);
}
.pbtn .prel {
  display: block;
  font: 600 0.62rem/1.3 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--route);
  margin: 0.15rem 0;
}
.pbtn .phook {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #4a3d2c;
}
.btn.pread {
  margin-top: 0.4rem;
  font-size: 0.8rem;
}
.profile {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(46rem, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.profile[hidden] {
  display: none;
}
.pf-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  font: 600 0.7rem var(--f-mono);
  color: var(--ink-dim);
}
.pf-bar button {
  font: inherit;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.pf-bar .pf-x {
  margin-left: auto;
}
.pf-in {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.5rem 3rem;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.55;
}
.pf-in h2 {
  font-family: var(--f-label);
  font-size: 2rem;
  line-height: 1.1;
  margin: 0.3rem 0 0.1rem;
}
.pf-yrs {
  font: 600 1rem var(--f-mono);
  color: var(--route);
}
.pf-rel {
  font: 600 0.7rem var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0.2rem 0 0.6rem;
}
.pf-bd {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.8rem;
  font-size: 0.85rem;
  margin: 0 0 0.7rem;
}
.pf-bd dt {
  font: 600 0.65rem var(--f-mono);
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 0.2rem;
}
.pf-bd dd {
  margin: 0;
}
.pf-cert,
.pf-note {
  border-left: 4px solid var(--ochre);
  background: rgba(255, 255, 255, 0.5);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin: 0.5rem 0;
}
.pf-note {
  border-left-color: var(--rule);
}
.pf-s h3 {
  font: 600 0.72rem var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--route);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.2rem;
  margin: 1.4rem 0 0.5rem;
}
.pf-s.colour {
  background: #fbf3df;
  border: 1px solid #e6d3a6;
  border-radius: 6px;
  padding: 0.1rem 0.9rem 0.5rem;
  margin-top: 1rem;
}
.pf-s.colour h3 {
  border: 0;
  margin-top: 0.7rem;
}
.pf-s.story p:first-of-type::first-letter {
  font-family: var(--f-label);
  font-size: 2.6em;
  float: left;
  line-height: 0.9;
  padding: 0.08em 0.1em 0 0;
  color: var(--route);
}
.pf-s ul {
  padding-left: 1.1rem;
}
.pf-s li {
  margin: 0.25rem 0;
}
.pf-s.doubts {
  color: #4a3d2c;
  font-size: 0.88rem;
}
.pf-in a[data-person] {
  color: var(--route);
  text-decoration: underline dotted;
  cursor: pointer;
}
.pf-tw {
  overflow-x: auto;
}
.pf-t {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.35;
}
.pf-t th,
.pf-t td {
  border: 1px solid var(--rule);
  padding: 0.3rem 0.4rem;
  vertical-align: top;
  text-align: left;
}
.pf-t th {
  background: var(--paper-2);
  font: 600 0.62rem var(--f-mono);
  text-transform: uppercase;
}
.pf-t td:first-child {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .pf-in {
    padding: 0.9rem 1rem 3rem;
  }
  .pf-t td:first-child {
    white-space: normal;
  }
}
.pf-in .kick {
  color: var(--route);
}
@media (hover: none) {
  .khint {
    display: none;
  }
}
/* "before Abraham": two clocks side by side (stacked on phones) */
.dayclock {
  border-left: 3px solid var(--ochre);
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.two h3 {
  margin: 0.4rem 0;
}
@media (max-width: 760px) {
  .two {
    grid-template-columns: 1fr;
  }
}
/* public site: the way into the family version (Cloudflare Access sign-in), on the front page */
.famsign-p {
  margin-top: 1.1rem;
}
.famsign {
  font: 600 0.66rem var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e9c98d;
  border: 1px solid rgba(233, 201, 141, 0.4);
  border-radius: 99px;
  padding: 0.35rem 0.8rem;
  text-decoration: none;
}
.famsign:hover {
  background: rgba(233, 201, 141, 0.12);
}
