@font-face {
  font-family: "Tokko Mincho";
  src: url("assets/tokko-mincho.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #3f2819;
  --ink-soft: #725239;
  --paper: #d7b877;
  --paper-light: #eed89e;
  --ocean: #467d7e;
  --stamp: #8b3d2e;
  --route-control-ink: #3a2517;
  --olive: #687044;
  --safe-top: max(20px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #b48b51;
}

body {
  margin: 0;
  color: var(--ink);
  background: #c9a464 url("assets/parchment-v03.webp") center top / 100% auto repeat-y fixed;
  font-family: "Songti SC", "STSong", serif;
  letter-spacing: 0;
}

/* Papyrus matches the supplied journal lettering; use the device's installed face. */
@font-face {
  font-family: "Journal Papyrus";
  src: local("Papyrus"), local("Papyrus-Regular");
  font-display: swap;
}

.journal-page-heading {
  position: absolute;
  z-index: 8;
  left: clamp(100px, var(--journal-title-x, 41%), calc(100% - 100px));
  top: var(--journal-title-y, 19.5%);
  width: 188px;
  max-width: 76%;
  min-height: 63px;
  padding: 10px 13px 9px;
  transform: translate(-50%, -50%);
  background: url("assets/title-labels/title-ribbon-05-rectangular-parchment.png") center / 100% 100% no-repeat;
  color: #573b1e;
  font-family: "Journal Papyrus", Papyrus, "Tokko Mincho", serif;
  font-weight: 400;
  pointer-events: none;
}

.journal-page-heading h2 {
  margin: 0;
  font: inherit;
  font-size: 21px;
  line-height: 1.3;
  white-space: nowrap;
}

.journal-page-heading p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.journal-cover-heading {
  left: clamp(122px, var(--journal-title-x), calc(100% - 122px));
  width: 216px;
  min-height: 73px;
  padding: 16px 18px;
  transform: translate(-50%, -50%) rotate(-15deg);
}

.journal-cover-heading h2 {
  font-size: 32px;
  text-align: center;
}

#day8Map .journal-page-heading {
  width: 210px;
  left: clamp(111px, var(--journal-title-x), calc(100% - 111px));
}

.journal-cover-quote {
  position: absolute;
  z-index: 8;
  bottom: max(5.6%, env(safe-area-inset-bottom));
  left: 5%;
  width: 90%;
  margin: 0;
  color: #573b1e;
  font: 12px/1.5 "Tokko Mincho", Georgia, serif;
  text-align: center;
  pointer-events: none;
}

.journey-archive-slide .terminal-file-heading h2,
.journey-archive-slide .terminal-file-number {
  font-family: "Journal Papyrus", Papyrus, "Tokko Mincho", serif;
}

.journey-archive-slide .terminal-file-heading h2,
.journey-archive-slide .terminal-file-number {
  font-size: 21px;
}

.device-shell {
  position: relative;
}

.dynamic-island {
  display: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.map-page {
  position: relative;
  height: 100svh;
  min-height: 700px;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.map-carousel {
  display: flex;
  width: 100%;
  height: 100svh;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.map-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.map-carousel::-webkit-scrollbar {
  display: none;
}

.map-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#app.overview-active {
  min-height: 100svh;
  overflow-y: visible;
}

#app.map-only-active {
  height: 100svh;
  overflow-y: hidden;
}

.map-page::after,
.page-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(62, 42, 24, 0.025) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 243, 199, 0.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: multiply;
}

.map-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, calc(100svh * 0.6106));
  height: max(100svh, calc(100vw * 1.6378));
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.rainforest-map-stage {
  width: var(--rainforest-map-width-mobile, 54.135svh);
  height: var(--rainforest-map-height-mobile, 100svh);
  transform: translate(
    calc(-50% + var(--rainforest-map-x, 8%)),
    calc(-50% + var(--rainforest-map-y, 0%))
  );
}

.cusco-map-stage {
  width: max(100vw, calc(100svh * 0.7279));
  height: max(100svh, calc(100vw * 1.3738));
}

.sacred-valley-map-stage {
  width: max(100vw, 94svh);
  height: max(100vw, 94svh);
  transform: translate(calc(-50% + 10%), -50%);
}

.south-peru-map-stage {
  width: max(100vw, calc(100svh * 0.5737));
  height: max(100svh, calc(100vw * 1.7429));
  transform: translate(calc(-50% + 10%), -50%);
}

.machu-picchu-map-stage {
  width: max(100vw, calc(100svh * 0.6483));
  height: max(100svh, calc(100vw * 1.5426));
}

.lake-titicaca-map-stage {
  width: max(100vw, calc(100svh * 0.6772));
  height: max(100svh, calc(100vw * 1.4767));
}

.arequipa-map-stage {
  width: max(100vw, calc(100svh * 0.6206));
  height: max(100svh, calc(100vw * 1.6113));
}

.terminal-page {
  background: rgba(205, 169, 101, 0.28);
}

.terminal-page-content {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(var(--safe-top) + 26px) 18px calc(var(--safe-bottom) + 34px);
  scrollbar-width: none;
}

.terminal-page-content::-webkit-scrollbar {
  display: none;
}

.terminal-file-heading {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 12px 11px;
  border: 1px solid rgba(68, 45, 28, 0.38);
  background: rgba(234, 220, 183, 0.88);
  box-shadow: 0 4px 10px rgba(57, 37, 22, 0.13);
  transform: rotate(-0.25deg);
}

.terminal-file-heading h2 {
  margin: 3px 0 0;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.terminal-file-heading p,
.terminal-file-heading small {
  display: block;
  margin: 4px 0 0;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0;
}

.terminal-file-number {
  display: grid;
  width: 34px;
  height: 48px;
  place-items: center;
  border-right: 1px solid rgba(70, 45, 26, 0.35);
  font-family: "Tokko Mincho", serif;
  font-size: 19px;
}

.terminal-file-heading .archive-stamp {
  width: 34px;
  height: 34px;
  font-size: 8px;
}

.journey-archive-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 11px;
  border-top: 1px solid rgba(69, 45, 27, 0.35);
  border-bottom: 1px solid rgba(69, 45, 27, 0.35);
}

.journey-archive-summary span {
  min-width: 0;
  padding: 8px 2px 7px;
  text-align: center;
}

.journey-archive-summary span + span {
  border-left: 1px solid rgba(69, 45, 27, 0.22);
}

.journey-archive-summary strong,
.journey-archive-summary small {
  display: block;
}

.journey-archive-summary strong {
  font-family: "Tokko Mincho", serif;
  font-size: 16px;
  font-weight: 400;
}

.journey-archive-summary small {
  margin-top: 2px;
  overflow: hidden;
  font-size: 5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.journey-day-file {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 10px;
  align-items: center;
  min-height: 48px;
  padding: 7px 7px 7px 5px;
  border: 1px solid rgba(69, 45, 27, 0.26);
  border-radius: 0;
  color: inherit;
  background: rgba(224, 205, 160, 0.62);
  box-shadow: 0 2px 4px rgba(55, 36, 22, 0.08);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.journey-day-file:active {
  background: rgba(207, 183, 128, 0.72);
}

.journey-day-file:nth-child(3n + 2) {
  transform: rotate(0.35deg);
}

.journey-day-file:nth-child(3n) {
  transform: rotate(-0.3deg);
}

.journey-day-file > span {
  font-family: "Tokko Mincho", serif;
  font-size: 15px;
  text-align: center;
}

.journey-day-file div,
.journey-day-file strong,
.journey-day-file small {
  display: block;
  min-width: 0;
}

.journey-day-file strong {
  overflow: hidden;
  font-family: "Tokko Mincho", serif;
  font-size: 8px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-day-file small {
  margin-top: 3px;
  color: rgba(63, 40, 25, 0.62);
  font-size: 5px;
  font-weight: 700;
  white-space: nowrap;
}

.journey-day-file > b {
  color: rgba(80, 49, 29, 0.38);
  font-size: 7px;
}

.journey-day-file.has-material > b {
  color: var(--stamp);
}

.poem-page-content {
  overflow-y: auto;
  padding: 0;
}

.journey-poem-scroll {
  position: absolute;
  top: 14.5%;
  left: 50%;
  width: min(330px, 100%);
  height: 73%;
  margin: 0;
  overflow: hidden;
  transform: translateX(-50%);
  background: none;
  filter: drop-shadow(0 7px 6px rgba(55, 35, 20, 0.18));
  transition: none;
}

.journey-poem-scroll::before,
.journey-poem-scroll::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.journey-poem-scroll::before {
  z-index: 1;
  top: 62px;
  bottom: 62px;
  background-image: url("assets/journey-scrolls/journey-scroll-paper-middle.png");
  background-position: center;
  background-size: 100% 100%;
}

.journey-poem-scroll::after {
  z-index: 2;
  bottom: 0;
  height: 75px;
  background-image: url("assets/journey-scrolls/journey-scroll-open-final.png");
  background-position: center bottom;
  background-size: 100% auto;
}

.journey-scroll-top {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 75px;
  background: url("assets/journey-scrolls/journey-scroll-open-final.png") center top / 100% auto no-repeat;
  pointer-events: none;
}

.journey-poem-body {
  position: absolute;
  z-index: 4;
  top: 92px;
  right: 43px;
  bottom: 82px;
  left: 43px;
  overflow: hidden;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
}

.journey-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(67, 43, 26, 0.36);
  border-bottom: 1px solid rgba(67, 43, 26, 0.36);
}

.journey-metrics span {
  min-width: 0;
  padding: 5px 2px 4px;
  text-align: center;
}

.journey-metrics span + span {
  border-left: 1px solid rgba(67, 43, 26, 0.22);
}

.journey-metrics small,
.journey-metrics strong,
.journey-metrics b {
  display: block;
}

.journey-metrics small {
  font-size: 5px;
  font-weight: 700;
  white-space: nowrap;
}

.journey-metrics strong {
  margin-top: 2px;
  font-family: "Tokko Mincho", serif;
  font-size: 13px;
  font-weight: 400;
}

.journey-metrics b {
  margin-top: 2px;
  font-size: 5px;
  font-weight: 500;
}

.journey-poem-text {
  padding: 8px 4px 2px;
  text-align: center;
}

.journey-poem-text p {
  margin: 0 0 10px;
  font-size: 8.5px;
  line-height: 15px;
}

.journey-poem-body footer {
  padding-top: 4px;
  border-top: 1px solid rgba(67, 43, 26, 0.28);
  font-size: 5px;
  font-weight: 700;
  text-align: center;
}

.map-art,
.route-layer,
.marker-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-art {
  display: block;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.route-layer {
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.daily-route-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.daily-route-layer .route.planned {
  stroke: rgba(68, 40, 21, 0.86);
  stroke-width: 1.6;
  stroke-dasharray: 5 6;
  opacity: 0.94;
}

.day8-train {
  filter: drop-shadow(0 2px 2px rgba(52, 34, 20, 0.34));
}

.lake-boat-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.lake-boat {
  position: absolute;
  width: var(--boat-width, 42px);
  height: auto;
  transform: translate(-50%, -50%) rotate(var(--boat-rotation, 0deg));
  transform-origin: center;
  opacity: 0.82;
  mix-blend-mode: multiply;
  filter: saturate(0.78) contrast(1.04) drop-shadow(0 2px 2px rgba(55, 36, 20, 0.22));
}

.route {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route.planned {
  stroke: rgba(75, 47, 24, 0.72);
  stroke-width: 1.7;
  stroke-dasharray: 7 7;
}

.route.actual-shadow {
  stroke: rgba(241, 216, 151, 0.66);
  stroke-width: 5;
}

.route.actual {
  stroke: var(--stamp);
  stroke-width: 2.4;
  stroke-dasharray: 1 0;
}

.marker-layer {
  z-index: 3;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}

.map-marker::before,
.map-marker::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.map-marker::before {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--ink);
  background: rgba(229, 199, 126, 0.88);
  box-shadow: 0 1px 3px rgba(47, 27, 15, 0.42);
}

.map-marker::after {
  width: 3px;
  height: 3px;
  background: var(--ink);
}

.map-marker.visited::before {
  width: 14px;
  height: 14px;
  border: 2px double #4b291b;
  background: var(--stamp);
}

.map-marker.visited::after {
  background: #f1d79b;
}

.map-marker.skipped {
  opacity: 0.28;
}

.map-marker.skipped::after {
  width: 12px;
  height: 1px;
  border-radius: 0;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(-35deg);
}

.map-marker.added::before {
  border-color: var(--stamp);
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 2px;
}

.marker-label {
  position: absolute;
  left: 18px;
  top: 50%;
  width: max-content;
  max-width: 150px;
  transform: translate(var(--label-shift-x, 0px), calc(-50% + var(--label-shift-y, 0px)));
  padding: 3px 6px 4px;
  color: #3d2719;
  background: rgba(228, 195, 119, 0.78);
  border-bottom: 1px solid rgba(71, 43, 24, 0.44);
  box-shadow: 0 1px 4px rgba(64, 41, 23, 0.18);
  text-align: left;
  pointer-events: none;
}

.marker-label strong,
.marker-label span,
.marker-label small {
  display: block;
  white-space: nowrap;
}

.marker-label small {
  margin-bottom: 1px;
  color: rgba(92, 46, 30, 0.82);
  font-family: "Tokko Mincho", serif;
  font-size: 6px;
  line-height: 1;
}

.static-itinerary-marker {
  pointer-events: none;
}

.map-marker.label-left .marker-label {
  right: 18px;
  left: auto;
  text-align: right;
}

.marker-label strong {
  font-family: "Tokko Mincho", serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.1;
}

.marker-label span {
  margin-top: 2px;
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 7px;
  font-weight: 500;
  line-height: 1;
}

.map-header {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 18px 34px 72px;
  color: #442818;
  background: none;
  pointer-events: none;
}

.map-header > * {
  pointer-events: auto;
}

.eyebrow,
.section-kicker,
.sheet-heading span {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.map-header h1 {
  margin: 3px 0 0;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
}

.map-header p {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 600;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(69, 43, 24, 0.62);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(231, 203, 139, 0.86);
  box-shadow: 0 2px 7px rgba(62, 39, 22, 0.16);
  cursor: pointer;
}

.map-menu-button {
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
}

.day-map-tools-header {
  justify-content: flex-end;
}

.page-title-ribbon-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.page-title-ribbon {
  position: absolute;
  z-index: 1;
  top: var(--title-y, 14%);
  left: var(--title-x, 50%);
  width: var(--title-width, 62%);
  transform: translate(-50%, -50%) rotate(var(--title-rotation, 0deg)) scaleY(var(--title-scale-y, 1));
  transform-origin: center;
  isolation: isolate;
  pointer-events: none;
}

.page-title-ribbon[hidden] {
  display: none;
}

.page-title-ribbon img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.page-title-ribbon::before,
.page-title-ribbon::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background-position: center top;
  background-repeat: repeat-y;
  background-size: var(--title-cloth-bg-width, 161.29%) auto;
  -webkit-mask-image: var(--title-ribbon-mask);
  mask-image: var(--title-ribbon-mask);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

.page-title-ribbon::before {
  background-image: url("assets/cloth-texture-brown-yellow.webp");
  mix-blend-mode: multiply;
  opacity: var(--title-cloth-normal-opacity, 0.16);
}

.page-title-ribbon::after {
  background-image: url("assets/cloth-texture-brown-yellow-sharp.webp");
  filter: contrast(var(--title-cloth-contrast, 1.1));
  mix-blend-mode: soft-light;
  opacity: var(--title-cloth-sharp-opacity, 0.06);
}

.page-title-ribbon-color {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: var(--title-balance-color, transparent);
  mix-blend-mode: color;
  opacity: var(--title-balance-opacity, 0);
  -webkit-mask-image: var(--title-ribbon-mask);
  mask-image: var(--title-ribbon-mask);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

.date-rail {
  position: absolute;
  z-index: 9;
  top: calc(var(--safe-top) + 104px);
  bottom: calc(var(--safe-bottom) + 92px);
  left: 9px;
  width: 29px;
  overflow: hidden;
  opacity: 0.35;
  transition: opacity 0.18s ease;
}

.date-rail:hover,
.date-rail:focus-within,
.date-rail.is-engaged {
  opacity: 1;
}

.date-line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 11px;
  width: 1px;
  background: rgba(62, 38, 21, 0.72);
  box-shadow: 1px 0 rgba(238, 210, 144, 0.38);
  pointer-events: none;
}

.date-list {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.date-tick {
  position: relative;
  display: flex;
  align-items: center;
  width: 29px;
  height: 28px;
  border: 0;
  padding: 0 0 0 17px;
  color: rgba(58, 37, 23, 0.78);
  background: transparent;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 8px;
  text-align: left;
  cursor: pointer;
}

.date-tick::before {
  content: "";
  position: absolute;
  left: 7px;
  width: 8px;
  height: 1px;
  background: currentColor;
}

.date-tick.active {
  color: var(--stamp);
  font-size: 10px;
  font-weight: 700;
}

.date-tick.active::before {
  left: 3px;
  width: 13px;
  height: 2px;
}

.command-button,
.map-drop-button,
.add-ledger-row,
.export-button {
  border: 1px solid rgba(70, 43, 24, 0.68);
  color: var(--ink);
  background: rgba(231, 202, 137, 0.92);
  box-shadow: 0 3px 10px rgba(55, 33, 19, 0.22);
  cursor: pointer;
}

.command-button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.button-symbol {
  color: var(--ocean);
  font-size: 19px;
}

.route-compass-button,
.round-command {
  position: absolute;
  z-index: 9;
  cursor: pointer;
}

.route-compass-button {
  top: var(--route-compass-y, 93.4%);
  left: var(--route-compass-x, 9.2%);
  width: var(--route-compass-size, 55px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  filter: var(--route-compass-filter, drop-shadow(0 3px 3px rgba(62, 36, 19, 0.3)));
}

.route-compass-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.round-command {
  top: var(--route-compass-y, 93.4%);
  left: calc(100% - var(--route-compass-x, 9.2%));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%) rotate(-1.2deg);
  border: 0.75px solid var(--route-control-ink);
  border-radius: 48% 52% 47% 53% / 52% 47% 53% 48%;
  padding: 0;
  color: var(--route-control-ink);
  background: transparent;
  box-shadow: 0 0 0 0.175px rgba(58, 37, 23, 0.42);
}

.round-command span,
.round-command span::before,
.round-command span::after {
  position: absolute;
  display: block;
  pointer-events: none;
}

.round-command span {
  inset: 0;
}

.round-command span::before,
.round-command span::after {
  content: "";
  top: 50%;
  left: 50%;
  background: var(--route-control-ink);
  transform-origin: center;
}

.round-command span::before {
  width: 16px;
  height: 0.75px;
  transform: translate(-50%, -50%) rotate(-2.4deg);
}

.round-command span::after {
  width: 0.75px;
  height: 16px;
  transform: translate(-50%, -50%) rotate(1.7deg);
}

.route-compass-button:focus-visible,
.round-command:focus-visible {
  outline: 1px solid var(--route-control-ink);
  outline-offset: 3px;
}

.page-band {
  position: relative;
  min-height: 100svh;
  padding: 66px 24px calc(54px + var(--safe-bottom));
  overflow: hidden;
  background: transparent;
}

.page-band > * {
  position: relative;
  z-index: 5;
}

.page-band h2 {
  margin: 8px 0 24px;
  font-family: "Tokko Mincho", "STSong", serif;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 400;
}

.memory-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  height: 18px;
  margin: 0 0 22px;
}

.memory-ribbon span {
  transform: skew(-8deg);
  border-top: 1px solid rgba(70, 44, 25, 0.6);
  border-bottom: 1px solid rgba(70, 44, 25, 0.4);
  background: rgba(113, 123, 76, 0.32);
}

.ledger-keepsake {
  position: relative;
  --ledger-frame-height: 470px;
  width: min(100%, 344px);
  margin: 0 auto 26px;
}

.ledger-open-trigger {
  display: block;
  width: 100%;
  height: 58px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent url("assets/scroll-roll-top.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 8px rgba(61, 39, 20, 0.18));
  cursor: pointer;
  transform-origin: center top;
  transition: height 0.32s ease, opacity 0.22s ease, transform 0.32s ease;
}

.ledger-keepsake.is-open .ledger-open-trigger {
  height: 0;
  opacity: 0;
  transform: scaleY(0.35);
  pointer-events: none;
}

.ledger-collapse-trigger {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 12;
  display: none;
  width: 100%;
  height: 56px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.ledger-keepsake.is-open .ledger-collapse-trigger {
  display: block;
}

.ledger-roll-toggle {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-radius: 0;
  padding: 8px 44px 13px;
  color: var(--ink);
  background: transparent url("assets/scroll-roll-top.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 8px 10px rgba(61, 39, 20, 0.2));
  text-align: left;
  cursor: pointer;
  transition: min-height 0.38s ease, padding 0.38s ease, filter 0.38s ease;
}

.ledger-roll-toggle span,
.ledger-roll-toggle strong,
.ledger-roll-toggle small {
  display: block;
}

.ledger-roll-toggle strong {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.ledger-roll-toggle small {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
}

.ledger-roll-toggle b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(64, 40, 22, 0.48);
  border-radius: 50%;
  font-size: 17px;
  font-weight: 400;
}

.ledger-keepsake.is-open .ledger-roll-toggle {
  min-height: 48px;
  padding: 5px 20px;
  border-top: 1px solid rgba(64, 40, 22, 0.5);
  border-bottom: 1px solid rgba(64, 40, 22, 0.5);
  background-image: none;
  filter: none;
}

.ledger-embed-wrap {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.68s cubic-bezier(0.2, 0.72, 0.18, 1), opacity 0.24s ease 0.08s;
}

.ledger-embed-inner {
  min-height: 0;
  overflow: visible;
}

.ledger-keepsake.is-open .ledger-embed-wrap {
  max-height: var(--ledger-frame-height);
  opacity: 1;
  pointer-events: auto;
}

.ledger-embed {
  display: block;
  width: 100%;
  height: 470px;
  border: 0;
  background: transparent;
}

.ledger-caption {
  margin: 8px 0 0;
  color: rgba(62, 42, 27, 0.78);
  text-align: center;
}

.ledger-caption strong,
.ledger-caption small {
  display: block;
}

.ledger-caption strong {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 12px;
  font-weight: 400;
}

.ledger-caption small {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 600;
}

.memory-compose {
  padding: 4px 0 20px;
  border-top: 1px solid rgba(65, 40, 22, 0.56);
  border-bottom: 1px solid rgba(65, 40, 22, 0.56);
}

.memory-compose textarea {
  display: block;
  width: 100%;
  min-height: 178px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  padding: 16px 2px 8px;
  outline: none;
  color: var(--ink);
  background: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(79, 51, 30, 0.22) 31px 32px);
  font-size: 16px;
  line-height: 32px;
}

.memory-compose textarea::placeholder {
  color: rgba(75, 51, 33, 0.58);
}

.memory-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.memory-toolbar .icon-button {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: rgba(234, 209, 151, 0.42);
  box-shadow: none;
}

.save-state {
  margin-left: auto;
  color: rgba(66, 43, 27, 0.64);
  font-size: 10px;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.memory-photo {
  position: relative;
  margin: 0;
  padding: 8px 8px 24px;
  background: #e9d9ae;
  box-shadow: 0 4px 12px rgba(59, 37, 20, 0.2);
}

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

.memory-photo:nth-child(odd) {
  transform: rotate(-1deg);
}

.memory-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.95) sepia(0.12);
}

.memory-stamp {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 3px double rgba(128, 54, 42, 0.72);
  border-radius: 50%;
  color: rgba(128, 54, 42, 0.8);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 18px;
  text-align: center;
  transform: rotate(-7deg);
}

.ledger-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ledger-total {
  flex: 0 0 auto;
  margin-top: 8px;
  text-align: right;
}

.ledger-total span,
.ledger-total strong {
  display: block;
}

.ledger-total span {
  font-size: 9px;
}

.ledger-total strong {
  margin-top: 4px;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 17px;
  font-weight: 400;
}

.ledger-table {
  border-top: 2px solid rgba(62, 39, 23, 0.78);
  border-bottom: 2px solid rgba(62, 39, 23, 0.78);
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(72px, 0.8fr) minmax(70px, 0.7fr) 32px;
  min-height: 52px;
  border-bottom: 1px solid rgba(72, 47, 28, 0.46);
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-row > * {
  min-width: 0;
  border: 0;
  border-right: 1px solid rgba(72, 47, 28, 0.36);
  border-radius: 0;
  padding: 10px 7px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.ledger-row > *:last-child {
  border-right: 0;
}

.ledger-header {
  min-height: 38px;
  font-weight: 700;
}

.ledger-header > * {
  display: flex;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 10px;
}

.remove-expense {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.add-ledger-row,
.export-button,
.map-drop-button {
  min-height: 46px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.add-ledger-row {
  width: 100%;
  margin-top: 16px;
  background: rgba(235, 210, 153, 0.42);
  box-shadow: none;
}

.export-button {
  width: 100%;
  margin-top: 40px;
  color: #efd99e;
  background: var(--ink);
}

.sheet-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(48, 32, 21, 0.45);
  backdrop-filter: blur(2px);
}

.bottom-sheet {
  position: fixed;
  z-index: 31;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(76svh, 640px);
  overflow-y: auto;
  padding: 10px 20px calc(22px + var(--safe-bottom));
  border-top: 1px solid rgba(64, 40, 22, 0.7);
  color: var(--ink);
  background: #d7b878 url("assets/parchment-v03.webp") center / cover;
  box-shadow: 0 -8px 26px rgba(44, 29, 18, 0.3);
}

.sheet-handle {
  width: 42px;
  height: 3px;
  margin: 0 auto 14px;
  border-radius: 3px;
  background: rgba(61, 39, 23, 0.48);
}

.sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sheet-heading h2 {
  margin: 5px 0 0;
  font-family: "Tokko Mincho", "STSong", serif;
  font-size: 26px;
  font-weight: 400;
}

.sheet-heading p {
  margin: 5px 0 0;
  font-size: 12px;
}

.close-sheet {
  width: 34px;
  height: 34px;
  background: rgba(233, 208, 150, 0.35);
  box-shadow: none;
  font-size: 21px;
}

.itinerary-list {
  margin-top: 18px;
  border-top: 1px solid rgba(67, 43, 25, 0.62);
}

.itinerary-stop {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  border-bottom: 1px solid rgba(67, 43, 25, 0.38);
}

.stop-order {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 22px;
  text-align: center;
}

.stop-copy strong,
.stop-copy span,
.stop-copy small {
  display: block;
}

.stop-copy strong {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 14px;
  font-weight: 400;
}

.stop-copy span {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

.stop-copy small {
  margin-top: 5px;
  color: rgba(63, 42, 26, 0.68);
  font-size: 9px;
}

.stop-status-button {
  min-width: 52px;
  height: 34px;
  border: 1px solid rgba(65, 42, 25, 0.58);
  border-radius: 4px;
  background: rgba(235, 211, 155, 0.4);
  font-size: 10px;
  cursor: pointer;
}

#placeForm {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

#placeForm label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
}

#placeForm input {
  width: 100%;
  height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(64, 41, 24, 0.72);
  border-radius: 0;
  padding: 0 2px;
  color: var(--ink);
  background: transparent;
  outline: none;
  font-size: 16px;
}

.map-drop-button {
  width: 100%;
  margin-top: 6px;
  color: #efd99e;
  background: var(--ink);
}

.status-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
  border: 1px solid rgba(66, 42, 24, 0.68);
  border-radius: 4px;
  overflow: hidden;
}

.status-control button {
  height: 42px;
  border: 0;
  border-right: 1px solid rgba(66, 42, 24, 0.5);
  background: rgba(233, 208, 150, 0.28);
  cursor: pointer;
}

.status-control button:last-child {
  border-right: 0;
}

.status-control button.active {
  color: #f0d79f;
  background: var(--stamp);
}

.delete-place {
  width: 100%;
  margin-top: 16px;
  border: 0;
  padding: 12px;
  color: var(--stamp);
  background: transparent;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border: 1px solid rgba(227, 195, 124, 0.35);
  border-radius: 4px;
  color: #f0dba6;
  background: rgba(57, 37, 23, 0.94);
  box-shadow: 0 4px 16px rgba(35, 23, 15, 0.28);
  font-size: 12px;
  text-align: center;
}

.map-page.drop-mode {
  cursor: crosshair;
}

.map-page.drop-mode .map-stage::after {
  content: "+";
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border: 1px dashed var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  background: rgba(231, 203, 139, 0.62);
  font-size: 23px;
  pointer-events: none;
}

/* Continuous parchment and archive system */
.overview-page,
.day-map-page,
.memory-page {
  background: transparent;
}

.overview-page {
  box-shadow: inset 0 -1px 0 rgba(74, 49, 29, 0.28);
}

.overview-map-artboard {
  position: absolute;
  container-type: inline-size;
  top: 50%;
  left: 50%;
  width: 106%;
  height: auto;
  aspect-ratio: 1440 / 2238;
  transform: translate(-50%, -50%);
}

.overview-map-content,
.overview-map-art,
.overview-label-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.overview-map-content {
  transform: translate(var(--overview-map-shift-x, 0%), var(--overview-map-shift-y, 0%)) scale(var(--overview-map-scale, 1));
  transform-origin: center;
}

.overview-map-art {
  object-fit: fill;
  mix-blend-mode: multiply;
  filter: saturate(0.94) contrast(1.02);
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at center, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 85% at center, #000 72%, transparent 100%);
}

.overview-label-layer {
  z-index: 3;
  pointer-events: none;
}

.overview-point {
  position: absolute;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border: 1px solid #5c341e;
  border-radius: 50%;
  background: #8d4931;
  box-shadow: 0 0 0 1px rgba(225, 196, 126, 0.6);
}

.overview-label {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--overview-label-counter-scale, 1));
  transform-origin: center;
  color: #3e281a;
  text-align: center;
  text-shadow: 0 1px rgba(239, 219, 170, 0.72);
}

.overview-label.anchor-right {
  transform: translate(-50%, -50%) scale(var(--overview-label-counter-scale, 1));
  text-align: center;
}

.overview-label strong,
.overview-label span {
  display: block;
  white-space: nowrap;
}

.overview-label strong {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: var(--label-en-size, 8px);
  font-weight: 400;
  line-height: 1;
}

.overview-label span {
  margin-top: var(--label-line-gap, 2px);
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: var(--label-zh-size, 6px);
  font-weight: 600;
  line-height: 1;
}

.overview-label.rainforest strong {
  font-size: var(--label-en-size, 7px);
}

.overview-label.rainforest span {
  font-size: var(--label-zh-size, 5px);
}

.overview-label.landmark {
  width: 11.8%;
  transform: translate(-50%, -50%);
  color: #3d291c;
  text-align: center;
  text-shadow: 0 0.4px rgba(244, 222, 168, 0.7);
}

.overview-label.landmark strong {
  overflow: hidden;
  font-size: var(--label-en-size, 5.6px);
  line-height: 1;
  text-overflow: clip;
}

.overview-label.landmark > span {
  display: none;
}

.overview-controls {
  display: none;
  overflow-y: auto;
  border: 1px solid rgba(68, 43, 26, 0.45);
  border-radius: 4px;
  padding: 16px;
  color: var(--ink);
  background: rgba(231, 216, 181, 0.98);
  box-shadow: 0 14px 34px rgba(48, 30, 17, 0.24);
  scrollbar-width: thin;
}

.overview-controls-heading,
.overview-controls label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overview-controls-heading {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(68, 43, 26, 0.32);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 14px;
}

.overview-controls-heading span {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 400;
}

.overview-controls label {
  display: block;
  margin: 0 0 12px;
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.overview-controls output {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.overview-controls input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--stamp);
}

.overview-controls input[type="text"] {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  border: 1px solid rgba(68, 43, 26, 0.38);
  border-radius: 2px;
  padding: 0 8px;
  color: var(--ink);
  background: rgba(244, 228, 187, 0.54);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 12px;
}

.overview-controls select {
  width: 100%;
  height: 34px;
  margin-top: 6px;
  border: 1px solid rgba(68, 43, 26, 0.38);
  border-radius: 2px;
  padding: 0 5px;
  color: var(--ink);
  background: rgba(244, 228, 187, 0.82);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 10px;
}

.overview-control-section {
  padding: 12px 0 4px;
  border-bottom: 1px solid rgba(68, 43, 26, 0.22);
}

.overview-control-section:last-child {
  border-bottom: 0;
}

.overview-control-section h2 {
  margin: 0 0 12px;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 11px;
  font-weight: 600;
}

.local-data-status {
  margin: 0 0 10px;
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 10px;
}

.local-data-status div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 22px;
  border-bottom: 1px dotted rgba(68, 43, 26, 0.24);
}

.local-data-status dt,
.local-data-status dd {
  margin: 0;
}

.local-data-status dd {
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.local-data-status dd[data-state="granted"] {
  color: #46613d;
}

.local-data-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.local-data-actions button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(68, 43, 26, 0.45);
  border-radius: 2px;
  padding: 4px 3px;
  color: var(--ink);
  background: rgba(224, 199, 143, 0.58);
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 9px;
  cursor: pointer;
}

.local-data-actions button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.local-data-action-state {
  min-height: 24px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 9px;
  line-height: 1.35;
}

.title-ribbon-visibility {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.title-ribbon-visibility input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--stamp);
}

.title-ribbon-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
}

.title-ribbon-library button {
  display: grid;
  place-items: center;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(68, 43, 26, 0.3);
  border-radius: 2px;
  padding: 5px;
  background: rgba(244, 228, 187, 0.55);
  cursor: grab;
}

.title-ribbon-library button:active {
  cursor: grabbing;
}

.title-ribbon-library button.active {
  border-color: var(--stamp);
  box-shadow: 0 0 0 1px var(--stamp) inset;
}

.title-ribbon-library img {
  display: block;
  width: 100%;
  max-height: 42px;
  object-fit: contain;
}

.overview-reset-label {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgba(68, 43, 26, 0.45);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(224, 199, 143, 0.68);
  font-size: 10px;
  cursor: pointer;
}

.archive-title-card {
  position: relative;
  min-width: 154px;
  padding: 13px 16px 12px 18px;
  border: 1px solid rgba(70, 48, 31, 0.32);
  border-radius: 2px;
  background: rgba(230, 217, 184, 0.82);
  box-shadow: 0 4px 10px rgba(55, 37, 24, 0.14);
  transform: rotate(-1deg);
}

.archive-title-card h1 {
  font-size: 28px;
}

.paperclip-mark {
  position: absolute;
  top: -12px;
  right: 18px;
  width: 12px;
  height: 34px;
  border: 2px solid rgba(80, 77, 69, 0.76);
  border-radius: 8px;
  transform: rotate(5deg);
  box-shadow: 1px 0 rgba(255, 255, 255, 0.32) inset;
}

.paperclip-mark.small {
  top: -9px;
  right: 15px;
  width: 9px;
  height: 27px;
  border-width: 1.5px;
}

.day-map-art {
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 88% 94% at center, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 88% 94% at center, #000 70%, transparent 100%);
}

.day-map-page .map-header > div:first-child {
  position: relative;
  padding: 10px 14px 10px 17px;
  border: 1px solid rgba(67, 44, 28, 0.26);
  background: rgba(231, 216, 181, 0.76);
  box-shadow: 0 3px 8px rgba(55, 36, 21, 0.12);
  transform: rotate(-0.8deg);
}

.day-map-page .map-header > div:first-child::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 14px;
  width: 10px;
  height: 28px;
  border: 2px solid rgba(76, 73, 67, 0.7);
  border-radius: 7px;
}

.command-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 11px;
}

  .map-menu-button {
  width: 34px;
  height: 34px;
  font-size: 21px;
}

.overview-archive-page,
.memory-page {
  padding: 52px 18px calc(50px + var(--safe-bottom));
  overflow: visible;
}

.overview-archive-page {
  min-height: 100svh;
  border-top: 0;
  background:
    linear-gradient(rgba(227, 211, 174, 0.18), rgba(198, 166, 105, 0.08)),
    transparent;
}

.national-archive-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 108px;
  margin: 0 7px 24px;
  padding: 21px 20px 17px;
  border: 1px solid rgba(71, 49, 32, 0.36);
  border-radius: 2px;
  background: rgba(234, 224, 200, 0.86);
  box-shadow: 0 5px 12px rgba(60, 40, 24, 0.14);
  transform: rotate(-0.45deg);
}

.national-archive-heading h2 {
  margin: 5px 0 0;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.national-archive-heading p {
  margin: 6px 0 0;
  font-size: 9px;
  font-weight: 600;
}

.national-archive-tabs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: end;
  gap: 3px;
  padding: 0 8px;
}

.national-archive-tab {
  min-width: 0;
  height: 58px;
  border: 1px solid rgba(72, 52, 36, 0.34);
  border-bottom: 0;
  border-radius: 3px 5px 0 0;
  padding: 8px 10px 6px;
  color: rgba(59, 42, 29, 0.7);
  background: rgba(198, 180, 141, 0.88);
  text-align: left;
  box-shadow: 0 -2px 5px rgba(61, 43, 28, 0.08);
  cursor: pointer;
}

.national-archive-tab:nth-child(2) {
  transform: translateY(4px);
}

.national-archive-tab.active {
  z-index: 2;
  color: var(--ink);
  background: rgba(237, 225, 194, 0.97);
  transform: translateY(-4px);
}

.national-archive-tab span,
.national-archive-tab strong,
.national-archive-tab small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.national-archive-tab span {
  color: var(--stamp);
  font-size: 7px;
}

.national-archive-tab strong {
  margin-top: 3px;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 10px;
  font-weight: 400;
}

.national-archive-tab small {
  margin-top: 2px;
  font-size: 7px;
}

.national-archive-folder {
  position: relative;
  z-index: 2;
  margin: 0 2px;
  border: 1px solid rgba(72, 51, 33, 0.37);
  border-radius: 2px;
  padding: 19px 12px 30px;
  background: rgba(232, 219, 187, 0.9);
  box-shadow: 0 8px 16px rgba(58, 40, 24, 0.13);
}

.national-archive-folder::after {
  content: "NATIONAL TRAVEL ARCHIVE · REPUBLIC OF PERU";
  position: absolute;
  right: 14px;
  bottom: 9px;
  color: rgba(65, 45, 29, 0.46);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 7px;
}

.national-archive-panel {
  animation: archive-file-open 0.28s ease both;
}

.national-archive-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 3px 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(72, 48, 29, 0.26);
  color: rgba(63, 43, 28, 0.68);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 7px;
}

.national-archive-index b {
  color: rgba(123, 57, 45, 0.76);
  font-weight: 400;
}

.landmark-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 7px;
  align-items: start;
}

.landmark-dossier {
  min-width: 0;
  border: 1px solid rgba(75, 52, 33, 0.28);
  border-radius: 2px;
  background: rgba(242, 232, 207, 0.87);
  box-shadow: 0 3px 7px rgba(56, 38, 23, 0.1);
  overflow: hidden;
  transform: rotate(var(--file-rotation, 0deg));
}

.landmark-dossier:nth-child(3n + 1) { --file-rotation: -0.35deg; }
.landmark-dossier:nth-child(3n + 2) { --file-rotation: 0.25deg; }

.landmark-dossier[open] {
  grid-column: 1 / -1;
  transform: none;
}

.landmark-dossier summary {
  display: block;
  min-height: 136px;
  cursor: pointer;
  list-style: none;
}

.landmark-dossier summary::-webkit-details-marker {
  display: none;
}

.landmark-file-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 72px;
  overflow: hidden;
  border-bottom: 1px solid rgba(77, 52, 32, 0.2);
  background:
    repeating-linear-gradient(0deg, rgba(72, 49, 30, 0.025) 0 1px, transparent 1px 5px),
    rgba(207, 188, 145, 0.58);
}

.landmark-file-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 8px);
  max-height: 64px;
  object-fit: contain;
  filter: saturate(0.82) contrast(1.03);
}

.landmark-file-visual.no-image::before {
  content: attr(data-index);
  color: rgba(113, 76, 45, 0.23);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 32px;
}

.landmark-file-copy {
  min-width: 0;
  padding: 8px 9px 9px;
}

.landmark-file-id,
.landmark-file-region {
  display: block;
  overflow: hidden;
  color: rgba(75, 50, 31, 0.62);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landmark-file-copy strong,
.landmark-file-copy b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landmark-file-copy strong {
  margin-top: 4px;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 9px;
  font-weight: 400;
}

.landmark-file-copy b {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 600;
}

.landmark-file-region {
  margin-top: 5px;
}

.landmark-file-detail {
  margin: 0 9px 10px;
  padding: 10px 0 0;
  border-top: 1px dashed rgba(76, 50, 30, 0.26);
  color: rgba(59, 40, 26, 0.78);
  font-size: 8px;
  line-height: 1.55;
}

.landmark-editor-row {
  min-width: 0;
  margin-bottom: 9px;
}

.landmark-editor-row > label {
  display: block;
  margin-bottom: 3px;
  color: rgba(124, 58, 45, 0.76);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 7px;
  letter-spacing: 0;
}

.landmark-editor-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: stretch;
  gap: 6px;
}

.landmark-edit-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 26px;
  border: 0;
  border-bottom: 1px solid rgba(75, 49, 29, 0.32);
  border-radius: 0;
  padding: 4px 2px;
  outline: none;
  color: rgba(55, 37, 24, 0.9);
  background: rgba(255, 252, 238, 0.34);
  font: 10px/1.45 "Tokko Mincho", "Songti SC", serif;
}

textarea.landmark-edit-input {
  min-height: 68px;
  resize: vertical;
  font-family: "Kaiti SC", "STKaiti", serif;
  font-size: 11px;
  line-height: 1.65;
}

.landmark-edit-input:focus {
  border-bottom-color: rgba(124, 58, 45, 0.82);
  background: rgba(255, 252, 238, 0.58);
}

.landmark-voice-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 26px;
  border: 1px solid rgba(75, 49, 29, 0.38);
  border-radius: 0;
  padding: 0;
  color: rgba(68, 43, 25, 0.78);
  background: transparent;
  cursor: pointer;
}

.landmark-voice-button svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landmark-voice-button.is-listening {
  color: #7e372e;
  border-color: rgba(126, 55, 46, 0.72);
  background: rgba(126, 55, 46, 0.08);
}

.landmark-save-state {
  display: block;
  padding-top: 2px;
  color: rgba(75, 50, 31, 0.5);
  font-size: 7px;
  text-align: right;
}

.book-archive-shelf {
  display: grid;
  gap: 11px;
}

.book-dossier {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 126px;
  border: 1px solid rgba(73, 50, 31, 0.3);
  border-radius: 2px;
  background: rgba(242, 233, 211, 0.91);
  box-shadow: 0 4px 8px rgba(57, 39, 24, 0.1);
  overflow: hidden;
}

.book-dossier:nth-child(even) {
  transform: rotate(0.3deg);
}

.book-file-spine {
  display: grid;
  place-items: center;
  color: rgba(239, 221, 177, 0.88);
  background: rgba(105, 69, 43, 0.82);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 8px;
  writing-mode: vertical-rl;
}

.book-file-copy {
  min-width: 0;
  padding: 15px 12px 13px;
}

.book-file-copy strong,
.book-file-copy b,
.book-file-copy span {
  display: block;
}

.book-file-copy strong {
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.book-file-copy b {
  margin-top: 5px;
  font-size: 9px;
}

.book-file-copy span {
  margin-top: 6px;
  color: rgba(66, 45, 29, 0.68);
  font-size: 7px;
}

.book-file-copy p {
  margin: 9px 0 0;
  color: rgba(58, 40, 26, 0.8);
  font-size: 8px;
  line-height: 1.55;
}

.book-year-stamp {
  align-self: start;
  margin: 14px 10px 0 0;
  border: 1px solid rgba(123, 57, 45, 0.58);
  padding: 4px 5px;
  color: rgba(123, 57, 45, 0.76);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 7px;
  transform: rotate(4deg);
}

.archive-load-error {
  grid-column: 1 / -1;
  margin: 20px 0;
  color: var(--stamp);
  font-size: 10px;
  text-align: center;
}

.memory-file-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 112px;
  margin: 0 8px 22px;
  padding: 22px 22px 18px;
  border: 1px solid rgba(71, 49, 32, 0.35);
  border-radius: 2px;
  background: rgba(234, 224, 200, 0.82);
  box-shadow: 0 5px 12px rgba(60, 40, 24, 0.14);
  transform: rotate(-0.6deg);
}

.memory-file-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
}

.memory-file-heading p {
  margin: 6px 0 0;
  font-size: 9px;
  font-weight: 600;
}

.archive-stamp {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 8px;
  border: 2px double rgba(123, 57, 45, 0.68);
  border-radius: 50%;
  color: rgba(123, 57, 45, 0.78);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  transform: rotate(8deg);
}

.ledger-keepsake {
  margin: 0 auto 28px;
}

.ledger-roll-toggle {
  min-height: 66px;
  padding: 7px 37px 11px;
}

.ledger-roll-toggle strong {
  font-size: 13px;
}

.ledger-roll-toggle small {
  font-size: 8px;
}

.ledger-roll-toggle b {
  width: 25px;
  height: 25px;
  font-size: 14px;
}

.ledger-keepsake.is-open .ledger-roll-toggle {
  min-height: 40px;
  padding: 4px 14px;
}

.archive-system {
  position: relative;
  margin: 0 2px;
  padding-top: 8px;
}

.archive-tabs {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  padding: 0 8px;
  touch-action: pan-y;
}

.archive-tab {
  position: relative;
  min-width: 0;
  height: 52px;
  border: 1px solid rgba(72, 52, 36, 0.3);
  border-bottom: 0;
  border-radius: 2px 5px 0 0;
  padding: 8px 5px 5px;
  color: rgba(59, 42, 29, 0.74);
  background: rgba(211, 194, 158, 0.88);
  text-align: left;
  box-shadow: 0 -2px 5px rgba(61, 43, 28, 0.08);
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.2, 0.78, 0.2, 1), background 0.24s ease;
}

.archive-tab:nth-child(2) { transform: translateY(3px); }
.archive-tab:nth-child(3) { transform: translateY(1px); }
.archive-tab:nth-child(4) { transform: translateY(4px); }

.archive-tab.active {
  z-index: 4;
  color: var(--ink);
  background: rgba(237, 225, 194, 0.96);
  transform: translateY(-5px);
}

.archive-tab.is-pressed {
  transform: translateY(-1px) scale(0.985);
}

.archive-tab span,
.archive-tab strong,
.archive-tab small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-tab span {
  font-size: 7px;
}

.archive-tab strong {
  margin-top: 3px;
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 9px;
  font-weight: 400;
}

.archive-tab small {
  margin-top: 2px;
  font-size: 7px;
}

.archive-folder {
  position: relative;
  z-index: 5;
  min-height: 330px;
  border: 1px solid rgba(72, 51, 33, 0.36);
  border-radius: 2px;
  padding: 24px 18px 28px;
  background: rgba(232, 219, 187, 0.88);
  box-shadow: 0 8px 16px rgba(58, 40, 24, 0.13);
}

.archive-folder::before {
  content: "PERSONAL ARCHIVE · DAY 01";
  position: absolute;
  right: 15px;
  bottom: 8px;
  color: rgba(65, 45, 29, 0.48);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 7px;
}

.archive-panel {
  animation: archive-file-open 0.28s ease both;
}

@keyframes archive-file-open {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.arrival-file,
.note-sheet {
  position: relative;
  min-height: 244px;
  padding: 24px 22px;
  border: 1px solid rgba(74, 52, 34, 0.28);
  border-radius: 1px;
  background: rgba(243, 235, 214, 0.9);
  box-shadow: 0 4px 8px rgba(60, 41, 24, 0.1);
  transform: rotate(-0.4deg);
}

.arrival-file.stamped::after {
  content: "LIMA\A23 SEP\A2026";
  white-space: pre;
  position: absolute;
  right: 28px;
  bottom: 62px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 2px double rgba(126, 55, 44, 0.62);
  border-radius: 50%;
  color: rgba(126, 55, 44, 0.7);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 8px;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-9deg);
}

.arrival-meta {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 13px 10px;
  padding-top: 8px;
  font-family: "Tokko Mincho", Georgia, serif;
}

.arrival-meta span {
  color: rgba(58, 42, 29, 0.58);
  font-size: 8px;
}

.arrival-meta strong {
  font-size: 10px;
  font-weight: 400;
}

.stamp-command,
.archive-panel-toolbar label {
  border: 0;
  border-bottom: 1px solid rgba(95, 53, 36, 0.55);
  border-radius: 0;
  padding: 5px 3px;
  color: #713d31;
  background: rgba(213, 194, 142, 0.5);
  font-size: 9px;
  cursor: pointer;
}

.stamp-command {
  position: absolute;
  right: 20px;
  bottom: 22px;
  transform: rotate(-2deg);
}

.archive-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 34px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(71, 50, 32, 0.34);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 8px;
}

.memory-board,
.ticket-board {
  position: relative;
  display: block;
  min-height: 220px;
  margin-top: 0;
}

.memory-board:empty::before,
.ticket-board:empty::before {
  content: "NO ITEMS FILED";
  position: absolute;
  inset: 32px 18px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(71, 50, 32, 0.28);
  color: rgba(65, 45, 29, 0.45);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 9px;
}

.memory-photo {
  position: absolute;
  top: calc(var(--i, 0) * 8px);
  left: calc(9% + var(--i, 0) * 4px);
  width: 78%;
  margin: 0;
  padding: 7px 7px 21px;
  transform: rotate(calc((var(--i, 0) - 1) * 1.2deg));
  transition: transform 0.24s ease;
}

.memory-photo:active {
  transform: translateY(-5px) rotate(0deg);
}

.memory-photo-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(70, 44, 27, 0.52);
  border-radius: 0;
  padding: 0 0 2px;
  color: rgba(67, 41, 25, 0.82);
  background: rgba(238, 224, 191, 0.88);
  box-shadow: 0 1px 3px rgba(55, 36, 22, 0.14);
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.memory-photo-delete:active {
  color: #7e372e;
  border-color: rgba(126, 55, 46, 0.72);
  background: rgba(231, 207, 164, 0.94);
}

.ticket-item {
  position: absolute;
  top: calc(var(--i, 0) * 10px);
  left: calc(7% + var(--i, 0) * 5px);
  width: 84%;
  padding: 8px;
  border: 1px solid rgba(70, 48, 31, 0.32);
  background: rgba(241, 232, 209, 0.92);
  box-shadow: 0 4px 10px rgba(53, 36, 22, 0.13);
  transform: rotate(calc((var(--i, 0) - 1) * -0.8deg));
}

.ticket-item img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  filter: saturate(0.7) sepia(0.16);
}

.note-sheet {
  min-height: 260px;
  padding-top: 46px;
}

.tape-strip {
  position: absolute;
  top: -7px;
  left: 50%;
  min-width: 126px;
  padding: 7px 12px;
  transform: translateX(-50%) rotate(-1deg);
  color: rgba(57, 41, 28, 0.72);
  background: rgba(215, 198, 145, 0.72);
  font-family: "Tokko Mincho", Georgia, serif;
  font-size: 8px;
  text-align: center;
}

.note-sheet textarea {
  display: block;
  width: 100%;
  min-height: 172px;
  resize: vertical;
  border: 0;
  padding: 5px 2px;
  outline: none;
  color: var(--ink);
  background: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(79, 51, 30, 0.2) 27px 28px);
  font-family: "Kaiti SC", "STKaiti", serif;
  font-size: 13px;
  line-height: 28px;
}

.note-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-top: 8px;
}

.note-voice-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(75, 49, 29, 0.4);
  border-radius: 0;
  padding: 0;
  color: rgba(68, 43, 25, 0.78);
  background: transparent;
  cursor: pointer;
}

.note-voice-button svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note-voice-button.is-listening {
  color: #7e372e;
  border-color: rgba(126, 55, 46, 0.68);
  background: rgba(126, 55, 46, 0.08);
}

.note-sheet .save-state {
  margin-left: auto;
  text-align: right;
}

@media (min-width: 560px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 34px);
    min-height: 100vh;
    padding: 16px;
    overflow: hidden;
    background-color: #a77c47;
    background-size: 720px auto;
  }

  .overview-controls {
    position: relative;
    display: block;
    flex: 0 0 clamp(210px, 24vw, 300px);
    width: clamp(210px, 24vw, 300px);
    max-height: calc(100vh - 32px);
  }

  .overview-label {
    pointer-events: auto;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
  }

  .overview-label.is-dragging {
    z-index: 8;
    cursor: grabbing;
    text-shadow: 0 0 0.5px #3e281a, 0 1px rgba(239, 219, 170, 0.72);
  }

  .page-title-ribbon {
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .page-title-ribbon.is-dragging {
    z-index: 12;
    cursor: grabbing;
  }

  .page-title-ribbon.is-selected {
    filter: drop-shadow(0 0 3px rgba(119, 55, 38, 0.5));
  }

  .route-compass-button {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .route-compass-button.is-dragging {
    z-index: 13;
    cursor: grabbing;
  }

  .device-shell {
    --safe-top: 32px;
    --safe-bottom: 16px;
    container-type: size;
    width: min(413px, calc((100vh - 32px) * 0.4736));
    height: min(872px, calc(100vh - 32px));
    overflow: hidden;
    transform: translateZ(0);
    border: 10px solid #1b1916;
    border-radius: 58px;
    background: #1b1916;
    box-shadow:
      0 24px 58px rgba(49, 31, 17, 0.38),
      0 2px 0 rgba(255, 255, 255, 0.12) inset,
      0 -2px 0 rgba(0, 0, 0, 0.5) inset;
  }

  .device-shell::before,
  .device-shell::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -14px;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: #37332e;
  }

  .device-shell::before {
    top: 142px;
    height: 76px;
  }

  .device-shell::after {
    top: 238px;
    height: 112px;
  }

  .dynamic-island {
    position: absolute;
    z-index: 80;
    top: 12px;
    left: 50%;
    display: block;
    width: 126px;
    height: 34px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #090909;
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.08) inset;
    pointer-events: none;
  }

  #app {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    background: #c9a464 url("assets/parchment-v03.webp") center top / 100% auto repeat-y;
  }

  #app::-webkit-scrollbar {
    display: none;
  }

  .map-page {
    height: 100%;
    min-height: 100%;
  }

  .map-carousel {
    height: 100%;
  }

  #app.overview-active {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }

  #app.map-only-active {
    height: 100%;
  }

  .page-band {
    min-height: 100%;
  }

  .map-stage {
    width: max(100cqw, calc(100cqh * 0.6106));
    height: max(100cqh, calc(100cqw * 1.6378));
  }

  .rainforest-map-stage {
    width: var(--rainforest-map-width-desktop, 54.135cqh);
    height: var(--rainforest-map-height-desktop, 100cqh);
  }

  .cusco-map-stage {
    width: max(100cqw, calc(100cqh * 0.7279));
    height: max(100cqh, calc(100cqw * 1.3738));
  }

  .arequipa-map-stage {
    width: max(100cqw, calc(100cqh * 0.6206));
    height: max(100cqh, calc(100cqw * 1.6113));
  }

  .sheet-backdrop,
  .bottom-sheet,
  .toast {
    position: absolute;
  }

  .sheet-backdrop {
    inset: 0;
  }

  .bottom-sheet {
    right: 0;
    left: 0;
    width: 100%;
    max-height: 76%;
    transform: none;
  }

  .toast {
    bottom: calc(20px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
