:root {
  color-scheme: light;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  background: #f6eddd;
  color: #33251d;
}

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

.gallery {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(.65rem, 2vh, 1rem);
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1rem, 3vh, 2rem) 1rem;
  background: radial-gradient(#bb9b7250 1px, transparent 1px) 0 0 / 18px 18px, #f6eddd;
}

.album-header { text-align: center; }
.album-label {
  display: inline-block;
  margin: 0 0 .45rem;
  padding: .24rem .7rem;
  border-radius: 1rem;
  background: #edc991;
  color: #53371f;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .13em;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 5.5vw, 2.7rem);
  line-height: 1.25;
  text-wrap: balance;
}

.hint {
  margin: .4rem 0 0;
  color: #694b39;
  font-size: clamp(.75rem, 2.5vw, .9rem);
}

.album-page {
  position: relative;
  width: min(100%, 34rem);
  margin: 0;
  padding: clamp(.45rem, 1.75vw, .85rem);
  border: 1px solid #d8c4a8;
  border-radius: .65rem;
  background: #fffcf5;
  box-shadow: 0 7px 0 -4px #e3d2b9, 0 14px 30px #654a2c24;
}

.album-page::before {
  content: "";
  position: absolute;
  top: -.32rem;
  left: calc(50% - 2.15rem);
  width: 4.3rem;
  height: .9rem;
  background: #eac480b8;
  transform: rotate(-4deg);
}

.photo-mat {
  height: clamp(13rem, 54vh, 34rem);
  height: clamp(13rem, 54dvh, 34rem);
  border-radius: .25rem;
  background: #eee4d5;
}

.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-caption {
  display: flex;
  justify-content: space-between;
  padding: .6rem .25rem .1rem;
  color: #694b39;
  font-size: .78rem;
  letter-spacing: .12em;
}

#position { font-variant-numeric: tabular-nums; }

.filmstrip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.2rem, 1vw, .45rem);
  width: min(100%, 25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.filmstrip li {
  display: grid;
  gap: .12rem;
  justify-items: center;
  padding: .2rem;
  border: 1px solid #d8c4a8;
  border-radius: .3rem;
  background: #fffcf5;
  color: #694b39;
  font-size: .62rem;
  font-variant-numeric: tabular-nums;
}

.filmstrip li.current { border-color: #97602e; box-shadow: inset 0 0 0 1px #97602e; }
.filmstrip img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: .15rem; }

.next { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; }
.next:focus-visible { outline: 3px solid #97602e; outline-offset: -5px; }
