:root {
  --ink: #f4efe4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1a1210;
  color: var(--ink);
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

#painting {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

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

.plaque {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  max-width: min(26rem, calc(100vw - 4.5rem));
  margin: 0;
  padding: 0.65rem 0.85rem 0.7rem;
  border: 1px solid rgba(244, 239, 228, 0.14);
  border-radius: 2px;
  background: rgba(12, 9, 7, 0.48);
  backdrop-filter: blur(10px);
  color: #f4efe4;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.55s ease;
}

.plaque.is-dim {
  opacity: 0;
}

.plaque:hover {
  background: rgba(12, 9, 7, 0.62);
}

.plaque:focus {
  outline: none;
}

.plaque:focus-visible {
  outline: 2px solid rgba(244, 239, 228, 0.75);
  outline-offset: 3px;
}

.plaque-title,
.plaque-meta {
  display: block;
}

.plaque-title {
  font-size: 0.95rem;
  font-style: normal;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.plaque-title i {
  font-style: italic;
}

.plaque-meta {
  margin-top: 0.2rem;
  color: rgba(244, 239, 228, 0.72);
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: 0.64rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-series {
  position: fixed;
  top: 0.85rem;
  right: 0.9rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(244, 239, 228, 0.12);
  border-radius: 2px;
  background: rgba(12, 9, 7, 0.42);
  backdrop-filter: blur(10px);
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-series a,
.gallery-series span {
  color: rgba(244, 239, 228, 0.5);
  text-decoration: none;
}

.gallery-series a:hover {
  color: #f4efe4;
}

.gallery-series [aria-current="page"] {
  color: #f4efe4;
}

.gallery-series a:focus {
  outline: none;
}

.gallery-series a:focus-visible {
  outline: 2px solid rgba(244, 239, 228, 0.75);
  outline-offset: 3px;
}

.gallery-full {
  position: fixed;
  z-index: 2;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
  filter:
    drop-shadow(0 1px 1px rgba(20, 14, 10, 0.85))
    drop-shadow(0 4px 10px rgba(20, 14, 10, 0.4));
}

.gallery-full svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-full:focus {
  outline: none;
}

.gallery-full:focus-visible {
  outline: 2px solid rgba(244, 239, 228, 0.9);
  outline-offset: 3px;
}

.gallery-full .icon-exit {
  display: none;
}

.gallery-full.is-on .icon-enter {
  display: none;
}

.gallery-full.is-on .icon-exit {
  display: block;
}

@media (max-width: 640px) {
  .plaque {
    max-width: min(18rem, calc(100vw - 4.2rem));
  }

  .gallery-series {
    top: 0.55rem;
    right: 0.55rem;
    gap: 0.45rem;
    padding: 0.32rem 0.45rem;
    font-size: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plaque {
    backdrop-filter: none;
    transition: none;
  }

  .gallery-series {
    backdrop-filter: none;
  }
}
