.still-viewer:not([open]) { display: none; }
.still-viewer {
  width: min(1120px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(12px, 2vw, 24px);
  color: #f7f6f2;
  background: #0e1011;
  border: 1px solid #414549;
  border-radius: 8px;
  overflow: auto;
  overscroll-behavior: contain;
}
.still-viewer::backdrop { background: rgb(8 9 9 / 89%); }
html:has(.still-viewer[open]) { overflow: hidden; }
.still-viewer-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.still-viewer-header h2 { font-size: clamp(15px, 2vw, 19px); }
.still-viewer-header form { margin: 0; }
.still-viewer-image {
  width: 100%;
  max-height: calc(100vh - 148px);
  max-height: calc(100dvh - 148px);
  object-fit: contain;
  background: #080909;
}
.still-viewer-footer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 12px; }
.still-viewer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 clamp(10px, 2vw, 18px);
  border: 1px solid #63686d;
  border-radius: 5px;
  color: inherit;
  background: #1b1e20;
  font-size: 14px;
  white-space: nowrap;
}
.still-viewer-button:hover { background: #2a2f33; }
.still-viewer-position { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1px 10px; }
.still-viewer-counter { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.still-viewer-original { color: #dbd9d4; font-size: 13px; text-decoration: underline; white-space: nowrap; }
