/* The visitor page. Everything looks like pieces of old paper laid
   on a warm desk: a book face for titles and choices, a typewriter face for
   clues and stories, and handwriting for picture captions. Orange still
   only marks what needs attention. */

@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/crimson-pro-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/crimson-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/crimson-pro-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/crimson-pro-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/courier-prime-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/courier-prime-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/courier-prime-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/courier-prime-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/caveat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/caveat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ECE7E0;
  --card: #F4EFE8;
  --paper: #F3EEE6;
  --paper-lift: #F7F3EC;
  --paper-back: #E7E0D5;
  --side: #E3DDD3;
  --ink: #26231F;
  --ink2: #4A453E;
  --mute: #7E766B;
  --faint: #B3AA9D;
  --line: #DCD4C8;
  --line2: #C9C0B2;
  --acc: #E8672A;
  --acc-ink: #A9420F;
  --acc-soft: #F6DECE;
  --hl: #F2D3BD;
  --map: #E4E0D9;
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --font: var(--serif);
  --lift: 0 1px 1px rgba(70, 55, 40, 0.1), 0 10px 22px -14px rgba(70, 55, 40, 0.5);
  --shadow: 0 6px 16px -8px rgba(70, 55, 40, 0.45);
  /* Fine grain and a few large soft stains, drawn here instead of loaded. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --stains: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.007' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.44 0 0 0 0 0.3 0 0 0 0.22 -0.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

html,
body.visitor {
  height: 100%;
}

body.visitor {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: var(--bg);
  font-family: var(--serif);
  font-size: 17px;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
}

.safe-probe {
  padding-top: env(safe-area-inset-top, 0px);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
}

/* Paper surfaces */

.start,
.unlock,
.story,
.story-bar {
  background-color: var(--bg);
  background-image: var(--stains), var(--grain);
}

.dot.acc {
  background: var(--acc);
}

/* Start */

.start-art {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 36px);
  left: 50%;
  width: min(100%, 380px);
  height: calc(100% - 420px);
  max-height: 360px;
  transform: translateX(-50%);
}

.start-art .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

.about-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

/* In test mode the start page says so, and can be left before starting. */
.start-test {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.start-exit {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.test-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}

.test-pill .i {
  width: 15px;
  height: 15px;
}

.start-paper {
  position: absolute;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 56px), 330px);
  transform: translateX(-50%);
  isolation: isolate;
  filter: drop-shadow(0 12px 16px rgba(70, 55, 40, 0.28));
}

.paper-back {
  position: absolute;
  inset: -12px 8px 14px -10px;
  z-index: -1;
  background-color: var(--paper-back);
  background-image: var(--grain);
  transform: rotate(-3.5deg);
}

.start-paper .paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 38px 22px 28px;
  background-color: var(--paper);
  background-image: var(--stains), var(--grain);
  transform: rotate(1deg);
  text-align: center;
}

.start-paper h1 {
  font-size: 31px;
  font-weight: 400;
  line-height: 1.15;
}

.go-round {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 16px -8px rgba(30, 25, 20, 0.6);
}

.go-round .i {
  width: 24px;
  height: 24px;
}

.go-round span {
  font-size: 14px;
  line-height: 1;
}

.perm-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line2);
  background: rgba(247, 243, 236, 0.7);
}

.perm-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 14.5px;
  color: var(--ink2);
}

.perm-pill span + span {
  box-shadow: inset 1px 0 0 var(--line2);
}

.perm-pill .i {
  width: 16px;
  height: 16px;
}

.start-paper .fine {
  font-size: 14px;
  font-style: italic;
  line-height: 1.4;
  color: var(--mute);
}

/* Explore */

.explore {
  --sheet-h: 320px;
  background: var(--map);
}

.map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* A pale, paper-coloured map, paler than the editor's. */
.paper-look .leaflet-tile-pane {
  filter: grayscale(1) sepia(0.2) brightness(1.1) contrast(0.7);
}

.explore .leaflet-bottom {
  bottom: var(--sheet-h);
}

.explore.no-map .map {
  display: none;
}

.map-failed {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  left: 20px;
  right: 20px;
  z-index: 2;
  font-size: 15px;
  color: var(--mute);
  text-align: center;
}

.top-left,
.top-right {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
}

.top-left {
  left: 14px;
}

.top-right {
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.round {
  background-color: var(--paper-lift);
  background-image: var(--grain);
  color: var(--ink);
  box-shadow: var(--lift);
}

.round.plain {
  background: transparent;
  box-shadow: none;
}

.round.dim {
  color: var(--mute);
}

.explore[data-sheet="full"] .top-right {
  display: none;
}

body.test .top-left,
body.test .top-right {
  top: calc(env(safe-area-inset-top, 0px) + 92px);
}

.map-chip {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  left: 50%;
  max-width: calc(100% - 140px);
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background-color: var(--paper-lift);
  background-image: var(--grain);
  box-shadow: var(--lift);
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

body.test .map-chip {
  top: calc(env(safe-area-inset-top, 0px) + 100px);
}

.test-banner {
  position: absolute;
  z-index: 6;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 560px;
  margin: 0 auto;
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
}

.test-banner .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-banner strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.test-banner .i {
  width: 18px;
  height: 18px;
}

.test-banner .exit {
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(243, 238, 230, 0.5);
  font-size: 14px;
}

.test-banner .small-text {
  font-size: 13.5px;
  color: rgba(243, 238, 230, 0.78);
}

/* The card at the bottom */

.sheet {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--sheet-h);
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 26px 26px 0 0;
  background-color: var(--paper);
  background-image: var(--stains), var(--grain);
  box-shadow: 0 -10px 30px -18px rgba(60, 45, 30, 0.45);
  transition: height 0.25s ease;
}

.sheet.dragging {
  transition: none;
}

.grab {
  flex: none;
  display: grid;
  place-items: center;
  height: 28px;
  cursor: grab;
  touch-action: none;
}

.grab::before {
  content: "";
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line2);
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
  padding: 0 18px calc(22px + env(safe-area-inset-bottom, 0px));
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 6px;
}

.sheet-head h2 {
  font-size: 22px;
}

.sheet-head .count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--side);
  font-size: 14px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}

.sheet-note {
  margin: -2px 2px 6px;
  font-size: 14px;
  font-style: italic;
  color: var(--mute);
}

.sheet-text {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink2);
}

.sheet-body .btn {
  margin-top: 16px;
}

.nearby {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

/* A nearby story is a card with no title. The whole card opens the story,
   and the found fragments in it are buttons of their own on top. */
.nearby-card {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px 14px 16px;
  border-radius: 3px;
  background-color: var(--paper-lift);
  background-image: var(--grain);
  box-shadow: var(--lift);
  color: var(--ink);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* A found fragment is a small print, like the ones pinned in the story. */
.slot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 3px;
  background: #FBF8F2;
  box-shadow: var(--lift);
  color: var(--ink);
  transform: rotate(-2deg);
}

.slot:nth-child(even) {
  transform: rotate(1.5deg);
}

.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot svg {
  width: 24px;
  height: 24px;
}

/* An emoji fills its slot, since its drawing has a margin of its own. */
.slot img.frag-icon {
  object-fit: contain;
}

.slot.fresh {
  box-shadow: 0 0 0 2px var(--acc), var(--lift);
}

.slot.locked {
  z-index: auto;
  background: transparent;
  box-shadow: none;
  border: 1.5px dashed var(--line2);
  border-radius: 2px;
  color: var(--faint);
  transform: none;
}

.slot.locked .i {
  width: 16px;
  height: 16px;
}

.mk {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.mk.on {
  background: var(--acc);
}

.row-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.new-tag {
  flex: none;
  padding: 1px 7px 0;
  border-radius: 999px;
  background: var(--acc);
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nearby-card.flash {
  animation: new-clue 2.8s ease-out 1;
}

@keyframes new-clue {
  0%, 25% { background-color: var(--acc-soft); }
  100% { background-color: var(--paper-lift); }
}

.prog {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--mute);
}

.prog.ready {
  font-style: normal;
  font-weight: 600;
  color: var(--acc-ink);
}

.dir {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 30px;
  max-width: 56px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
}

.dir-word {
  color: var(--mute);
}

.arrow {
  display: block;
  width: 18px;
  height: 18px;
}

.arrow .i {
  width: 100%;
  height: 100%;
  fill: var(--ink);
}

/* One discover point */

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 8px;
  font-size: 15.5px;
  color: var(--mute);
}

.detail-head {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.detail-title {
  font-size: 26px;
  line-height: 1.1;
}

/* Before the story is unlocked its title is not shown. */
.detail-title.waiting {
  font-size: 22px;
  font-style: italic;
  color: var(--mute);
}

.head-dir {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.head-dir .arrow {
  width: 20px;
  height: 20px;
}

.head-dist {
  font-size: 14px;
  color: var(--mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.detail-intro {
  margin-top: 6px;
  font-size: 16.5px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink2);
}

/* Clues are notes, each with another sheet peeking out behind it. */
.clue-stack,
.clue-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0 4px;
  list-style: none;
}

.clue-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 16px 16px 18px;
  background-color: var(--paper-lift);
  background-image: var(--stains), var(--grain);
  box-shadow: var(--lift);
}

.clue-card::before {
  content: "";
  position: absolute;
  inset: 5px -5px -6px 5px;
  z-index: -1;
  background-color: var(--paper-back);
  background-image: var(--grain);
  box-shadow: var(--lift);
  transform: rotate(1.6deg);
}

.clue-card:nth-child(even)::before {
  transform: rotate(-1.4deg);
}

.clue-card .num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mute);
}

.clue-card .clue-text {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
}

.clue-card .done {
  color: var(--ink);
}

.clue-card .done .i {
  width: 18px;
  height: 18px;
}

.clue-card .clip {
  position: absolute;
  top: -16px;
  right: 22px;
  width: 14px;
  height: 36px;
}

.clue-card.waiting {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line2);
  color: var(--mute);
}

.clue-card.waiting::before {
  display: none;
}

.clue-card.waiting .clue-text {
  font-size: 14px;
}

.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.steps {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.2px var(--ink2);
  font-size: 14px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}

.steps li + li::before {
  content: "";
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  width: 8px;
  border-top: 1.2px dashed var(--faint);
}

.steps li.on {
  background: var(--acc);
  box-shadow: none;
  color: #FFFFFF;
}

.go-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  padding: 0 14px 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.go-pill .i {
  width: 18px;
  height: 18px;
}

.go-pill:disabled {
  background: transparent;
  color: var(--mute);
  box-shadow: inset 0 0 0 1.2px var(--line2);
  cursor: default;
}

.sheet-body .button-note {
  margin-top: 8px;
  font-size: 15px;
  font-style: italic;
  color: var(--mute);
  text-align: right;
}

.moved-away {
  margin-top: 14px;
  font-size: 15px;
  font-style: italic;
  color: var(--mute);
}

/* Map markers */

.me-marker .me {
  position: relative;
  width: 100px;
  height: 100px;
}

.me .cone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.me-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--paper), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.me.pretend .me-dot::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px dashed var(--ink);
}

.found-pin svg {
  display: block;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
}

/* The card that says a story was saved */

.saved-wrap {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.saved-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 22, 0.55);
}

.saved-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 26px 26px 0 0;
  background-color: var(--paper);
  background-image: var(--stains), var(--grain);
}

.saved-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.saved-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.saved-check {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

.saved-check .i {
  width: 20px;
  height: 20px;
}

.saved-head h2 {
  font-size: 22px;
}

.saved-card {
  display: grid;
  grid-template-columns: 56px 10px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px 10px 10px;
  background-color: var(--paper-lift);
  background-image: var(--grain);
  box-shadow: var(--lift);
  color: var(--ink);
  text-decoration: none;
}

.saved-card img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  background: var(--side);
}

/* A story with no pictures: the dot and title move to the left and the
   card keeps the same height as one with a picture. */
.saved-card.no-picture {
  grid-template-columns: 10px minmax(0, 1fr) 16px;
  min-height: 62px;
  padding-left: 14px;
}

.saved-card .dot {
  width: 10px;
  height: 10px;
}

.saved-card strong {
  overflow: hidden;
  font-size: 19px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saved-count {
  font-size: 15px;
  color: var(--mute);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Answering the question */

.unlock {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 0;
}

.bar-back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.bar-title {
  overflow: hidden;
  font-size: 22px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-side {
  justify-self: end;
}

.pill-acc {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font-size: 14px;
}

.unlock-body {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  isolation: isolate;
  padding: 6px 22px calc(24px + env(safe-area-inset-bottom, 0px));
}

.found-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.found-row b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acc);
}

.found-row .lock {
  color: var(--ink2);
}

.found-row .close-word {
  margin-left: 4px;
  font-size: 15px;
  font-style: italic;
  color: var(--mute);
}

.q-card {
  position: relative;
  margin: 6px 4px 4px;
  padding: 26px 22px;
  background-color: var(--paper-lift);
  background-image: var(--stains), var(--grain);
  box-shadow: var(--lift);
}

.q-card::before,
.q-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  background-color: var(--paper-back);
  background-image: var(--grain);
  box-shadow: var(--lift);
}

.q-card::before {
  inset: -6px 6px 8px -8px;
  transform: rotate(-2.2deg);
}

.q-card::after {
  inset: 8px -6px -8px 10px;
  transform: rotate(1.4deg);
}

.q {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
}

.choices {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 18.5px;
  text-align: left;
}

.choice .radio {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.4px #A79E92;
}

.choice[aria-checked="true"] .radio {
  background: var(--acc);
  box-shadow: inset 0 0 0 1.4px var(--acc), inset 0 0 0 5px var(--bg);
}

.choice.wrong {
  color: var(--faint);
  text-decoration: line-through;
  cursor: default;
}

.choice.wrong .radio {
  opacity: 0.4;
}

.unlock-feedback {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unlock-feedback:empty {
  display: none;
}

.err {
  font-size: 16px;
  font-style: italic;
  color: var(--acc-ink);
  text-align: center;
}

.hint-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background-color: var(--paper-lift);
  background-image: var(--grain);
  box-shadow: var(--lift);
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.5;
  transform: rotate(-0.6deg);
}

.hint-card small {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acc-ink);
}

.tries {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-style: italic;
  color: var(--mute);
}

.tries b {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.4px var(--ink2);
}

.tries b.x {
  background: var(--ink2);
}

.spacer {
  flex: 1;
}

.go-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 19px;
}

.go-bar .i {
  width: 20px;
  height: 20px;
}

.go-bar:disabled {
  background: #CFC7BB;
  color: var(--paper);
  cursor: default;
}

/* After the tries are used up, the quiet link becomes this button. */
.unlock-anyway {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

.give-up {
  align-self: center;
  padding: 6px 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink2);
}

/* Scrolling wheels */

.wheels {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wheels.single .wheel-col {
  flex-direction: row;
  gap: 18px;
}

.wheel-step {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.2px var(--line2);
}

.wheel {
  position: relative;
  width: 88px;
  height: 200px;
}

.wheel.wide {
  width: 128px;
}

.wheels.single .wheel {
  width: 120px;
}

.wheel::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
  border-block: 1.2px solid var(--ink);
  pointer-events: none;
}

.wheel-track {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 80px;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}

.wheel-track::-webkit-scrollbar {
  display: none;
}

.wheel-item {
  height: 40px;
  line-height: 40px;
  scroll-snap-align: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.wheel-item.on {
  color: var(--ink);
  font-weight: 700;
  font-size: 22px;
}

/* The story */

.story {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.story-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 6px;
}

.story-loading {
  padding: 80px 24px;
  color: var(--mute);
  text-align: center;
}

.story-page {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  isolation: isolate;
  padding: 0 22px calc(44px + env(safe-area-inset-bottom, 0px));
}

.story-page > h1 {
  font-size: 28px;
}

.story-page > p {
  color: var(--mute);
}

.story-head h1 {
  font-size: 32px;
  line-height: 1.1;
}

.reveal {
  margin-top: 8px;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.reveal span {
  padding: 1px 5px;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat left / 100% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation: reveal 0.9s ease 0.25s both;
}

@keyframes reveal {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}

.found {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
}

.story-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.story-tabs button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0 9px;
  font-size: 14px;
  color: var(--mute);
}

.story-tabs button[aria-selected="true"] {
  color: var(--acc-ink);
}

.story-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -1px;
  height: 2px;
  background: var(--acc);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel[hidden] {
  display: none;
}

/* The story is a typed page with two more sheets behind it. */
.story-sheet {
  position: relative;
  margin: 8px 6px 10px;
  padding: 26px 22px 64px;
  background-color: var(--paper-lift);
  background-image: var(--stains), var(--grain);
  box-shadow: var(--lift);
}

.story-sheet::before,
.story-sheet::after {
  content: "";
  position: absolute;
  z-index: -1;
  background-color: var(--paper-back);
  background-image: var(--grain);
  box-shadow: var(--lift);
}

.story-sheet::before {
  inset: 6px -8px -6px 8px;
  transform: rotate(1.8deg);
}

.story-sheet::after {
  inset: -4px 10px 10px -10px;
  transform: rotate(-1.4deg);
}

.story-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story-text p {
  font-family: var(--mono);
  font-size: 15.5px;
  line-height: 1.75;
}

.page-no {
  position: absolute;
  left: 22px;
  bottom: 18px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--faint);
}

.credits {
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
}

.credits b {
  margin-right: 6px;
  font-weight: 600;
  color: var(--ink2);
}

.panel-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

.clue-list {
  margin-top: 0;
}

.clue-card.answer {
  grid-template-columns: auto minmax(0, 1fr);
}

.clue-card.answer .clue-text {
  font-family: var(--serif);
  font-size: 16.5px;
  font-style: italic;
}

.clue-card.answer .i {
  width: 16px;
  height: 16px;
  color: var(--ink);
}

/* Pictures are taped photos with a handwritten note. */
.gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 22px 16px 16px;
  scroll-snap-align: center;
}

.photo {
  position: relative;
  max-width: 100%;
  padding: 10px 10px 14px;
  background: #FBF8F2;
  box-shadow: var(--lift);
  transform: rotate(-1.4deg);
}

.photo img {
  display: block;
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
}

.tape {
  position: absolute;
  top: -11px;
  width: 66px;
  height: 22px;
  background: rgba(232, 222, 199, 0.8);
  box-shadow: 0 1px 2px rgba(60, 45, 30, 0.12);
}

.tape.left {
  left: 10px;
  transform: rotate(-9deg);
}

.tape.right {
  right: 10px;
  transform: rotate(8deg);
}

.caption {
  align-self: flex-end;
  max-width: 76%;
  margin: -22px 4px 0 0;
  padding: 8px 14px 6px;
  background-color: var(--paper-lift);
  background-image: var(--grain);
  box-shadow: var(--lift);
  transform: rotate(2.4deg);
  font-family: var(--hand);
  font-size: 23px;
  line-height: 1.1;
  color: var(--ink2);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.page-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.pcount {
  font-size: 17px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}

/* Audio */

.player {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 4px 0;
  padding: 22px 18px 18px;
  background-color: var(--paper-lift);
  background-image: var(--stains), var(--grain);
  box-shadow: var(--lift);
}

.wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 76px;
  cursor: pointer;
}

.wave i {
  flex: 1;
  height: 8%;
  border-radius: 1px;
  background: var(--ink2);
  opacity: 0.3;
  transition: height 0.4s ease;
}

.wave[data-state="ready"] i {
  opacity: 0.45;
}

.wave i.played {
  background: var(--ink);
  opacity: 1;
}

.wave[data-state="failed"] {
  display: none;
}

.play-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

.play-button .i {
  width: 22px;
  height: 22px;
}

.track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seek {
  --pct: 0%;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.seek::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(var(--ink), var(--ink)) 0 / var(--pct) 100% no-repeat, var(--line2);
}

.seek::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.seek::-moz-range-track {
  height: 2px;
  background: var(--line2);
}

.seek::-moz-range-progress {
  height: 2px;
  background: var(--ink);
}

.seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.times {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.controls button {
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line2);
  font-size: 15px;
}

.read-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.read-label .dot {
  width: 9px;
  height: 9px;
}

.read-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.read-text p {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink2);
}

/* Menu */

.menu-wrap {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.menu-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 22, 0.4);
}

.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  border-radius: 0 24px 24px 0;
  background-color: var(--paper);
  background-image: var(--stains), var(--grain);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 10px 22px;
}

.drawer-head h2 {
  font-size: 22px;
}

.drawer-head .round {
  width: 38px;
  height: 38px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  padding: 8px 22px;
}

.drawer-label {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.drawer-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  text-decoration: none;
}

.drawer-row strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
}

.drawer-row small {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--mute);
}

.drawer-empty {
  padding: 10px 0;
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  color: var(--mute);
  border-top: 1px solid var(--line);
}

.drawer-note {
  margin-top: auto;
  padding: 16px 22px 26px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
}

.dialog.about {
  background-color: var(--paper);
  background-image: var(--grain);
}

.about p {
  font-size: 16.5px;
}

.about p + p {
  margin-top: 10px;
}

.about-credit {
  font-size: 14px !important;
  color: var(--mute) !important;
}

@media (prefers-reduced-motion: reduce) {
  .start-art .pulse,
  .reveal span {
    animation: none;
  }

  .nearby-card.flash {
    animation: none;
    background-color: var(--acc-soft);
  }

  .scrap,
  .lock-art *,
  .arrival-body,
  .cheer .pop-title {
    animation: none !important;
  }

  .lock-art .shackle {
    transform: translateY(-9px) rotate(-14deg);
  }

  .wave i {
    transition: none;
  }
}

/* Fragment pictures */

.clue-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

/* On paper, a fragment picture is a small print pinned above the words. */
.frag-photo {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-bottom: 10px;
  padding: 5px;
  background: #FBF8F2;
  box-shadow: var(--lift);
  transform: rotate(-2deg);
  color: var(--ink);
}

.frag-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frag-photo svg {
  width: 44px;
  height: 44px;
}

.frag-photo img.frag-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.clue-card .clue-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* A fragment on its own: a small sheet of paper laid over the map, with
   straight edges like every other piece of paper on the page. */

.scrap-wrap {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 24px 24px 12vh;
}

.scrap-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 22, 0.45);
}

.scrap {
  position: relative;
  width: min(300px, 100%);
  filter: drop-shadow(0 14px 16px rgba(40, 30, 20, 0.35));
  transform: rotate(-1.5deg);
  animation: scrap-in 0.3s ease-out;
}

@keyframes scrap-in {
  from { opacity: 0; transform: translateY(16px) rotate(-5deg); }
  to { opacity: 1; transform: rotate(-1.5deg); }
}

.scrap-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 24px;
  background-color: var(--paper-lift);
  background-image: var(--stains), var(--grain);
}

.scrap-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--mute);
}

.scrap-num {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-right: 36px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mute);
}

.scrap-print {
  display: grid;
  place-items: center;
  padding: 6px;
  background: #FBF8F2;
  box-shadow: var(--lift);
  color: var(--ink);
  transform: rotate(-2deg);
}

.scrap-print.icon {
  width: 104px;
  height: 104px;
}

.scrap-print.icon img {
  width: 84px;
  height: 84px;
}

.scrap-print.icon svg {
  width: 56px;
  height: 56px;
}

.scrap-print.photo {
  width: min(210px, 100%);
  aspect-ratio: 1;
}

.scrap-print.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scrap-text {
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.55;
}

.scrap-note {
  margin: 0;
  font-size: 19px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink2);
}

/* The key card, shown when the visitor reaches a spot. A key slides into
   the lock and turns, the lock opens, then the words and button rise. */

.scrap-paper.arrival {
  align-items: center;
  gap: 10px;
  text-align: center;
}

.lock-art {
  width: 180px;
  height: auto;
  margin-top: 6px;
  overflow: visible;
}

.lock-art .body {
  fill: #FBF8F2;
  stroke: var(--ink);
  stroke-width: 2.4;
}

.lock-art .shackle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: shackle-open 0.35s ease-out 1s both;
}

.lock-art .hole {
  fill: var(--ink);
}

.lock-art .key {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: key-turn 0.3s ease-in-out 0.7s both;
}

.lock-art .key-slide {
  animation: key-slide 0.55s ease-out 0.1s both;
}

.lock-art .glow {
  fill: var(--acc);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: lock-glow 0.8s ease-out 1.05s both;
}

.arrival-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: arrival-rise 0.35s ease-out 1.3s both;
}

.arrival-title {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
}

.arrival-text {
  margin: 0 0 8px;
  font-size: 17px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink2);
}

/* Pop-ups on the question page: one that asks whether the visitor found
   the right thing after three wrong answers, and a short cheer for a right
   answer, where the key is already in and the lock springs open. */

.scrap-paper.pop {
  align-items: center;
  gap: 12px;
  text-align: center;
}

.scrap-paper.stuck {
  padding-top: 34px;
}

.pop-title {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.pop-title:focus {
  outline: none;
}

.pop-text {
  margin: 0 0 8px;
  font-size: 18px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink2);
}

.scrap-paper.cheer {
  padding: 26px 22px 30px;
  cursor: pointer;
}

.cheer .pop-title {
  animation: arrival-rise 0.3s ease-out 0.45s both;
}

.lock-art.quick .key-slide {
  animation: none;
}

.lock-art.quick .key {
  animation-delay: 0.05s;
}

.lock-art.quick .shackle {
  animation-delay: 0.3s;
}

.lock-art.quick .glow {
  animation-delay: 0.35s;
}

@keyframes key-slide {
  from { opacity: 0; transform: translateX(-34px); }
  30% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@keyframes key-turn {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(0.15); }
  100% { transform: scaleY(-1); }
}

@keyframes shackle-open {
  to { transform: translateY(-9px) rotate(-14deg); }
}

@keyframes lock-glow {
  0% { opacity: 0; transform: scale(0.5); }
  40% { opacity: 0.28; }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes arrival-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
