:root {
  --viewport-height: 100vh;
  --page-gutter: clamp(0.8rem, 2vmin, 20px);
  --intro-gap: calc(4rem / 15);
  --image-gap: clamp(0.8rem, calc(var(--viewport-height) * 0.03), 24px);
  --footer-gap: clamp(0.8rem, calc(var(--viewport-height) * 0.03), 26px);
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  font-size: min(15px, 6vmin);
  line-height: 1.6;
  font-synthesis: none;
  color: #000;
  background: #fcfbf7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}
html,
body {
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
}
html {
  height: 100%;
}
body {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  height: var(--viewport-height);
  margin: 0;
  padding: var(--page-gutter);
  touch-action: none;
}
p, h1, figure {
  margin: 0;
}
a {
  color: inherit;
  text-decoration-color: currentColor;
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 5px;
}
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* Reserve three text lines and the intro gap, then fit the 3:2 image. */
  width: min(
    832px,
    100%,
    max(0px, calc(
      (var(--viewport-height) - 2 * var(--page-gutter) - 4.8rem - var(--intro-gap) - var(--image-gap) - var(--footer-gap)) * 1.5
    ))
  );
  min-width: 0;
  margin: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 10px;
  background: #fcfbf7;
  color: #000;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

h1 {
  font: inherit;
}
.intro p {
  margin-top: var(--intro-gap);
  line-height: 1.6;
}

.landscape {
  position: relative;
  isolation: isolate;
  margin-block: var(--image-gap) var(--footer-gap);
  touch-action: none;
  outline-offset: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.landscape.city-ready { cursor: grab; }
.landscape[data-dragging="true"] { cursor: grabbing; }
.landscape:focus-visible { outline: 1px solid #000; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.landscape img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.city-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}
.city-ready img {
  opacity: 0;
}
.city-ready .city-canvas {
  opacity: 1;
}

.city-controls {
  position: absolute;
  z-index: 1;
  inset: auto 12px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  font-size: 12px;
}
.city-ready .city-controls {
  display: flex;
}
.city-hint, .city-reset {
  padding: 7px 11px;
  border: 1px solid rgb(56 51 40 / 16%);
  border-radius: 3px;
  background: rgb(252 251 247 / 94%);
  color: #39372f;
  font: inherit;
  line-height: 1.4;
}
.city-reset {
  min-height: 44px;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.city-reset:disabled {
  opacity: .65;
  cursor: default;
}
.city-reset:not(:disabled):hover { background: #fcfbf7; }
.city-reset:focus-visible { outline: 2px solid #39372f; outline-offset: 3px; }
@media (pointer: coarse) {
  .city-zoom-hint { display: none; }
}
@media (max-width: 360px) {
  .city-controls { inset-inline: 8px; bottom: 8px; font-size: 11px; }
  .city-hint { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .landscape {
    transform: none;
  }
}

footer {
  display: flex;
  gap: calc(22rem / 15);
  margin-top: 0;
}

@supports (height: 100dvh) {
  :root {
    --viewport-height: 100dvh;
  }
}
