:root {
  color-scheme: light;
  --cream: #faf2e4;
  --fern: #30482d;
  --serif: 'Iowan Old Style', Charter, Georgia, serif;
  --paper: url('../assets/illustrations/watercolor/paper.png');
  color: var(--fern);
  background: var(--cream) var(--paper);
  font-family: var(--serif);
}

* { box-sizing: border-box; }
body { margin: 0; }
:focus-visible { outline: 3px solid #30482d; outline-offset: 3px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.splash {
  position: relative;
  width: min(100%, max(43rem, calc((100svh - 3.4rem) * 1.3333)));
  margin-inline: auto;
  padding-bottom: env(safe-area-inset-bottom);
  text-align: center;
}
.splash-scene { position: relative; }
.splash-scene img {
  display: block;
  width: 100%;
  height: auto;
}
.explore-map {
  position: absolute;
  left: 32%;
  bottom: 4.4%;
  width: 39%;
  height: 8.8%;
  min-height: 44px;
  border-radius: 999px;
}
.explore-map:focus-visible { outline-color: #263b25; box-shadow: 0 0 0 6px #faf2e4; }
.note-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .25rem .75rem;
  color: #395237;
  font-size: 1.08rem;
  font-style: italic;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

html:has(#note-from-john[open]) { overflow: hidden; }
#note-from-john {
  width: min(38rem, calc(100% - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border: 1px solid #c4b493;
  border-radius: .7rem;
  padding: 0;
  color: var(--fern);
  background: var(--cream) var(--paper);
  box-shadow: 0 .4rem 1.4rem #2e332840;
}
#note-from-john[open] { display: flex; flex-direction: column; }
#note-from-john::backdrop { background: #252e247d; }
.note-toolbar { display: flex; justify-content: end; flex: none; padding: .45rem .65rem 0; }
#close-note {
  width: 44px;
  height: 44px;
  border: 1px solid #b9a988;
  border-radius: .45rem;
  color: inherit;
  background: #fff9ec;
  cursor: pointer;
  font: 1.5rem/1 system-ui, sans-serif;
}
.note-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: .1rem clamp(1rem, 5vw, 2.6rem) 1.8rem;
  color: #354232;
  font: 1.06rem/1.55 var(--serif);
  text-align: left;
}
.note-content h2 { margin: 0 0 .65em; color: var(--fern); font: 600 1.75rem/1.15 var(--serif); }
.note-content h2:focus { outline: none; }
.note-content p { margin: 0 0 .85em; }
.note-content p:last-child { margin-bottom: 0; }

@media (max-width: 600px) and (orientation: portrait) {
  body {
    min-height: 100svh;
    display: grid;
    align-content: safe center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .splash { width: min(100%, 28rem); padding-bottom: 0; }
  .explore-map,
  .note-link { bottom: auto; left: 50%; transform: translate(-50%, -50%); }
  .explore-map { top: 39.6%; width: 58%; height: 6.4%; }
  .note-link { position: absolute; top: 46.4%; width: 48%; padding: 0; }
  .note-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) {
  body {
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
  }
  .splash { width: min(100%, 36rem); }
}
