@font-face {
  font-family: DiatypeRegular;
  src: url(font_library/ABCDiatype-Regular-Trial.woff2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --page-pad: 6px;
  --footer-height: 34px;
  --blue: #0000ff;
}

html, body { width: 100%; height: 100%; }

body {
  overflow: hidden;
  font-family: DiatypeRegular, Arial, sans-serif;
  font-size: 15px;
  line-height: 16.5px;
  color: #000;
  background: #fff;
}

a, p { font: inherit; }
a { color: var(--blue); }
.underline { text-decoration: underline; }


.description-shell {
  width: 100vw;
  height: calc(100vh - var(--footer-height));
  display: grid;
  grid-template-columns: 28.5% 71.5%;
}

.description-left,
.snapshot-column {
  min-width: 0;
  height: calc(100vh - var(--footer-height));
}

.description-left {
  grid-column: 1;
  padding: var(--page-pad);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.description-left::-webkit-scrollbar,
.snapshot-column::-webkit-scrollbar { display: none; }

.header-title {
  display: inline-block;
  margin-bottom: 18px;
  font: inherit;
  font-weight: 400;
  line-height: inherit;
  color: #000;
  text-decoration: underline;
}
.header-title:hover { color: var(--blue); }

.description-text {
  position: static;
  width: auto;
  padding: 0;
  margin: 0;
  color: #000;
}

.snapshot-column {
  grid-column: 2;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--page-pad);
  scrollbar-width: none;
}

.snapshot-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}

.snapshot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.snapshot-featured { grid-column: 2; }


.snapshot-toggle {
  appearance: none;
  border: 0;
  padding: 0;
  margin-top: 16px;
  background: transparent;
  font: inherit;
  color: #000;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.snapshot-toggle:hover,
.snapshot-toggle:focus-visible,
.snapshot-toggle.is-active {
  color: var(--blue);
  outline: none;
}

.snapshot-archive {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 0;
}

.snapshot-archive.is-visible {
  display: grid;
}

.snapshot-archive img {
  display: block;
  width: 100%;
  height: auto;
}

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: var(--footer-height);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--page-pad);
  color: #fff;
  background: #1245ff;
}
footer a, #about, #clock, #powered-by { color: #fff; }
#about { text-align: left; white-space: nowrap; }
#clock { text-align: right; white-space: nowrap; }
#powered-by {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

@media (max-width: 800px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100dvh;
  }

  .description-shell {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .description-left,
  .snapshot-column {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: var(--page-pad);
  }

  .description-text {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .snapshot-column { margin-top: 18px; }

  .snapshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 6px;
  }

  .snapshot,
  .snapshot-featured {
    grid-column: auto;
    width: 100%;
    height: auto;
  }

 .snapshot-toggle {
    margin-top: 16px;
  }

  .snapshot-archive,
  .snapshot-archive.is-visible {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 6px;
  }

  footer {
    width: 100%;
    min-height: 0;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "status clock"
      "credit credit";
    gap: 3px 8px;
    padding: 5px var(--page-pad) calc(5px + env(safe-area-inset-bottom));
    font-size: clamp(12px, 3.6vw, 15px);
    line-height: 1.1;
  }

  #about {
    grid-area: status;
    width: auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #clock {
    grid-area: clock;
    width: auto;
    min-width: 0;
    white-space: normal;
    text-align: right;
    overflow-wrap: anywhere;
  }

  #powered-by {
    grid-area: credit;
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: normal;
  }
}
