/* ---------- 照片目录 ---------- */

.album__tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--win-dark);
  box-shadow: 0 1px 0 var(--win-light);
  scrollbar-width: thin;
}

.album__tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: #bcbcbc;
  border: 2px solid;
  border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
  border-bottom: 0;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
  .album__tab {
    background: #34383d;
  }
}

.album__tab span {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
}

.album__tab[aria-selected="true"] {
  background: var(--paper);
  border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
  position: relative;
  top: 1px;
}

.album__tab[aria-selected="true"] span {
  color: var(--accent);
}

.photo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.album__aside {
  min-width: 0;
  padding: 2px 2px 0;
}

.photo-frame {
  position: relative;
  background: #fffdf8;
  padding: 10px 10px 12px;
  border: 1px solid #c9c2ae;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.22);
}

.photo-frame::before,
.photo-frame::after {
  content: "";
  position: absolute;
  width: 62px;
  height: 20px;
  background: rgba(240, 226, 176, 0.85);
  border: 1px solid rgba(196, 178, 122, 0.6);
  top: -8px;
  transform: rotate(-4deg);
}

.photo-frame::before {
  left: 12px;
}

.photo-frame::after {
  right: 12px;
  transform: rotate(5deg);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #d9d4c6;
  filter: saturate(0.9) contrast(1.02);
}

.photo-frame__label {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #5c5648;
  margin: 8px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.photo-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
  border: 1px dashed var(--win-dark);
  color: var(--ink-soft);
  font-size: 14px;
}

.album__aside {
  min-width: 0;
}

.album__year {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 6px;
}

.album__title {
  font-family: var(--font-read);
  font-size: clamp(19px, 4vw, 24px);
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--ink);
  word-break: break-word;
}

.album__note {
  font-family: var(--font-read);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.album__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.album__count {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.album__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--win-dark);
}

@media (max-width: 620px) {
  .album__thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}

.album__thumb {
  padding: 3px;
  background: var(--win);
  border: 2px solid;
  border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
  cursor: pointer;
  min-width: 0;
  min-height: 44px;
  display: block;
}

.album__thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(0.55) contrast(0.95);
  opacity: 0.82;
}

.album__thumb b {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  text-align: center;
  padding: 2px 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album__thumb[aria-current="true"] {
  border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
  background: var(--paper);
}

.album__thumb[aria-current="true"] img {
  filter: none;
  opacity: 1;
}

.album__thumb[aria-current="true"] b {
  color: var(--accent);
  font-weight: 700;
}

.album__disclaimer {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px dotted var(--win-dark);
  padding-top: 10px;
  line-height: 1.65;
}
