﻿.letter-page {
  padding: 132px 0 72px;
}

.letter-wrap {
  max-width: 820px;
}

.letter-back {
  display: inline-flex;
  margin-bottom: 22px;
  color: #94a3b8;
  font-size: 14px;
}

.letter-back:hover {
  color: white;
}

.letter-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 18px;
}

.letter-date {
  color: #94a3b8;
  font-size: 15px;
  letter-spacing: .08em;
}

.letter-page h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin: 16px 0 10px;
}

.letter-zh-title {
  margin: 0 0 28px;
  color: #94a3b8;
  font-size: 18px;
}

.letter-figure {
  margin: 0 0 28px;
}

.letter-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #061018;
  cursor: zoom-in;
}

.letter-figure figcaption {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 14px;
}

.letter-figure + .letter-figure {
  margin-top: -8px;
}

.letter-notice {
  margin: 0 0 36px;
  padding: 18px 20px;
  border: 1px solid rgba(251, 191, 36, .2);
  border-radius: 18px;
  background: rgba(251, 191, 36, .05);
  color: #cbd5e1;
  font-size: 15px;
}

.letter-notice p {
  margin: 0;
}

.letter-notice p + p {
  margin-top: 10px;
  color: #94a3b8;
}

.letter-body p {
  margin: 0 0 14px;
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.75;
}

.letter-body p.zh {
  margin-bottom: 28px;
  color: #94a3b8;
  font-size: 16px;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", ui-sans-serif, system-ui, sans-serif;
}

.letter-sign {
  margin-top: 36px;
  color: #cbd5e1;
}

.letter-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.letter-pager a {
  display: block;
  max-width: 46%;
  color: #cbd5e1;
  font-size: 14px;
}

.letter-pager a:hover {
  color: white;
}

.letter-pager small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.letter-pager .next {
  text-align: right;
  margin-left: auto;
}

.letter-lightbox-lock {
  overflow: hidden;
}

.letter-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(4, 10, 18, .92);
  touch-action: none;
}

.letter-lightbox.open {
  display: block;
}

.letter-lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.letter-lightbox img {
  display: block;
  width: auto;
  max-width: 100vw;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}

.letter-lightbox img.is-zoomed {
  cursor: grab;
}

.letter-lightbox-close,
.letter-lightbox-tools button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.letter-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.letter-lightbox-tools {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.letter-lightbox-tools button:disabled {
  opacity: .35;
  cursor: default;
}

@media (max-width: 800px) {
  .letter-page {
    padding: 110px 0 56px;
  }

  .letter-body p,
  .letter-body p.zh {
    font-size: 16px;
  }

  .letter-pager {
    display: block;
  }

  .letter-pager a,
  .letter-pager .next {
    max-width: none;
    text-align: left;
    margin: 0 0 18px;
  }
}
