:root {
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  background: #141917;
  color: #f4f3ed;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  height: 100dvh;
  min-height: 240px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
header, footer { background: #19211e; }
header {
  border-bottom: 1px solid #3f4a43;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(10px, 4vw, 34px);
  gap: 10px;
}
h1 { margin: 0; font-size: 16px; letter-spacing: .04em; }
h1 span {
  color: #c3cec5;
  font-size: 12px;
  font-weight: 400;
  margin-left: 8px;
  white-space: nowrap;
}
.zoom, nav { display: flex; align-items: center; justify-content: center; gap: 6px; }
button, select {
  font: inherit;
  font-size: 14px;
  color: inherit;
  border: 1px solid #54655a;
  border-radius: 5px;
  background: #27332d;
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}
button:not(:disabled), select { cursor: pointer; }
button[aria-pressed="true"] { background: #d9e6dc; color: #16231b; }
button:disabled { opacity: .4; }
:focus-visible { outline: 2px solid #b8e6ca; outline-offset: -3px; }
main {
  overflow: auto;
  overscroll-behavior: contain;
  background: #111513;
}
.frame {
  min-width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
}
img {
  display: block;
  width: var(--image-width, 100%);
  height: auto;
  aspect-ratio: 1920 / 817;
  object-fit: contain;
  user-select: none;
}
main[data-zoom="true"] { cursor: grab; }
main[data-dragging="true"] { cursor: grabbing; }
footer {
  border-top: 1px solid #3f4a43;
  padding: 5px 6px max(8px, env(safe-area-inset-bottom));
}
#status {
  color: #c3cec5;
  font-size: 12px;
  min-height: 18px;
  text-align: center;
}
.sr-only {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 490px) {
  h1 span { display: block; margin: 3px 0 0; }
  nav button, select { padding-inline: 8px; }
}
@media (orientation: landscape) and (max-height: 430px) {
  header { padding-block: 4px; }
  footer { padding-block: 3px; }
  footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  #status { min-height: 0; }
}
