:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #14221f;
  color: #f7faf4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.landscape {
  position: fixed;
  inset: 0;
  margin: 0;
  background: #14221f;
}

.landscape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#show-whole-view:checked ~ .landscape img { object-fit: contain; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.back-link,
.view-label,
.about-view {
  position: fixed;
  z-index: 2;
  background: #142b25;
  color: #f7faf4;
  border: 1px solid #c2d0bf;
  border-radius: .45rem;
  font-size: .95rem;
  line-height: 1.5;
}

.back-link {
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: calc(1rem + env(safe-area-inset-left, 0px));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: calc(100% - 2rem);
  padding: .6rem .9rem;
  text-underline-offset: .2em;
}

.view-choice {
  position: fixed;
  z-index: 3;
  left: calc(1.8rem + env(safe-area-inset-left, 0px));
  bottom: calc(1.8rem + env(safe-area-inset-bottom, 0px));
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: #f3dc9d;
  cursor: pointer;
}

.view-label {
  left: calc(1rem + env(safe-area-inset-left, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .6rem .9rem .6rem 2.8rem;
  cursor: pointer;
}

.about-view {
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: min(24rem, calc(100% - 2rem));
  max-height: calc(100vh - 9rem);
  max-height: calc(100dvh - 9rem);
  overflow-y: auto;
}

.about-view summary {
  min-height: 44px;
  padding: .6rem .9rem;
  cursor: pointer;
}

.about-view p {
  margin: 0;
  padding: 0 .9rem .9rem;
}

.skip {
  position: fixed;
  top: -8rem;
  left: 1rem;
  z-index: 4;
  padding: .7rem 1rem;
  background: #f3dc9d;
  color: #14221f;
}

.skip:focus { top: 1rem; }

a:focus-visible,
summary:focus-visible,
.view-choice:focus-visible + .view-label {
  outline: 3px solid #f3dc9d;
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .about-view {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media print {
  :root { color-scheme: light; background: white; color: black; }
  .back-link, .view-choice, .view-label, .about-view, .skip { display: none; }
  .landscape { position: static; background: white; }
  .landscape img { height: auto; object-fit: contain; }
}
