
html {
  --footer-background: #050505;
  --footer-border: 0.07rem solid rgb(from var(--base-color) r g b / 0.15);
  --secondary-focus-color: rgb(from var(--color) r g b / 0.65);
}
html[data-color-scheme="light"] {
  --footer-background: #eee;
}


.logo-badges {
  filter: grayscale(1);
}
.logo-badges [data-id="yd"] {
  filter: invert(1) hue-rotate(180deg) opacity(40%);
}


html {
  --picture-background: #ffffff09;
}
html[data-color-scheme="light"] {
  --picture-background: #0000000f;
}
html[data-interactive] .item-content img {
  opacity: 0.1;
}
html[data-interactive] .item-content.loaded img {
  opacity: 1;
  transition: opacity 0.3s 0.05s;
}
.item-caption .date {
  color: rgb(from var(--color) r g b / 0.35);
  margin-right: 0.2em;
}
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  text-align: center;
  padding: 0 var(--padding-x);
  user-select: none;
}
nav a,
nav a:link,
nav a:visited,
nav a:hover,
nav a:active {
  color: var(--focus-color);
  text-decoration: none;
}
nav a:hover {
  background: rgb(from var(--focus-color) r g b / 0.1);
}
nav a:not([href]) {
  color: inherit;
  pointer-events: none;
  opacity: 0.3;
}
nav a {
  display: inline-flex;
  min-width: 3.5em;
  text-align: center;
  align-items: center;
  justify-content: center;
  border-radius: 0.25em;
  padding: 0.5em 0.5em 0.55em;
  margin: 0 0.5em;
  box-sizing: border-box;
}
nav a svg {
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viewport-container {
  display: flex;
  flex-direction: column;
  min-height: max(100vh, 360px);
  box-sizing: border-box;
}


header {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
  font-size: 0.8rem;
  color: rgb(from var(--color) r g b / 0.4);
  padding: 0.2rem var(--padding-x) 0.1rem;
  box-sizing: border-box;
}
header p {
  white-space: nowrap;
  margin: 0;
}
header .ref {
  flex: auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
header .ref::before {
  content: "·";
  margin: 0 0.5rem;
}
header .logo {
  font-size: 0.75rem;
}
header .logo a {
  --spacing: 0.2em;
  display: inline-block;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: var(--spacing);
}
header .logo a span {
  display: inline-block;
  position: relative;
}
header .logo a::before {
  content: "⯊ ";
}
header .logo a:hover {
  text-decoration: none;
}
header .logo a:hover span::after {
  content: "";
  height: 0.05em;
  background: currentColor;
  position: absolute;
  inset: auto var(--spacing) 0 0;
}
header a.list {
  white-space: nowrap;
}
header nav {
  justify-content: flex-end;
  white-space: nowrap;
  padding: 0;
  margin-left: 2rem;
  margin-right: -1em;
}
header .logo + nav {
  flex: auto;
}
header nav .sep {
  margin: 0 0.2em;
}
header nav a {
  min-width: 3em;
  padding: 0.15em 0.5em;
}
header nav a:not([href]) {
  opacity: 0.75;
}
header nav a svg {
  stroke-width: 1;
}
header nav a[data-key="quit"] svg {
  stroke-width: 0.75;
}
header .source-details {
  flex: auto;
  display: flex;
  justify-content: flex-end;
}
header .source-details a:link,
header .source-details a:visited,
header .source-details a:focus,
header .source-details a:hover,
header .source-details a:active {
  color: var(--secondary-focus-color);
}


footer {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: rgb(from var(--color) r g b / 0.4);
  background: var(--footer-background);
  border-top: var(--footer-border);
  padding: 0.5rem var(--padding-x);
}
footer a:link,
footer a:visited,
footer a:focus,
footer a:hover,
footer a:active {
  color: var(--secondary-focus-color);
}
footer h2 {
  font-size: 1em;
  line-height: 1.05;
}
footer .source-details {
  max-width: 600px;
}
footer p.list-title {
  margin-bottom: 0;
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}
footer p.list-title + ul {
  margin-top: 0;
}
footer li {
  padding: 0;
  margin: 0.15em 0;
}
footer .ref-container {
  display: flex;
  flex-direction: column;
  flex: auto;
  text-align: right;
}
footer .ref {
  flex: auto;
}
footer .ref li {
  margin: 0 0 0.35em 0;
}
footer .cat span {
  display: inline-block;
  color: var(--base-color-contrast);
  background: rgb(from var(--base-color) r g b / 0.5);
  border-radius: 0.2em;
  padding: 0.1em 0.3em 0;
}
@media (width <= 600px) {
  footer {
    flex-direction: column;
    gap: 0.75em;
  }
  footer .ref-container {
    text-align: start;
  }
}

html {
  --padding-x: 1rem;
}
.content-only.layout header,
.content-only.layout footer {
  display: none;
}
main {
  display: flex;
  width: 100%;
  flex-direction: column;
  flex: auto;
  position: relative;
}
main > nav {
  display: none;
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
}
.content-only.layout main > nav {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.item {
  display: flex;
  width: 100%;
  flex-direction: column;
  flex: auto;
  margin: 0;
}
.item-caption {
  text-align: center;
  padding: 1rem var(--padding-x) 0.95rem;
}
.content-only.layout .item-caption {
  padding: 1rem var(--padding-x) 0.25rem;
}
.item-caption.empty,
.content-only.layout .item-caption.empty {
  padding: 0;
}
.item-content {
  flex: auto;
  background: var(--picture-background);
  position: relative;
}
html[data-content="images"] .item-content img {
  display: block;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
