/* GSAP「期刊翻页」进入篇目 — 过渡层（见 doc-enter-transition.js） */
.doc-flip-root {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.doc-flip-root[hidden] {
  display: none !important;
}

.doc-flip-root.is-active {
  pointer-events: auto;
}

.doc-flip-scene {
  position: fixed;
  transform-style: preserve-3d;
  perspective: 2000px;
  box-sizing: border-box;
}

.doc-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform, width, height, box-shadow;
}

.doc-flip-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 4px solid #0a0a0a;
  background: #ffffff;
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: -10px 12px 0 #e50000;
}

.doc-flip-front {
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.doc-flip-issue {
  align-self: flex-start;
  box-sizing: border-box;
  border: 3px solid #0a0a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.42rem;
  min-height: 1.45rem;
  min-width: 2rem;
  max-width: 100%;
  font-family: var(--sans);
  font-size: clamp(10px, 2.1vw, 12px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.doc-flip-cat {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.doc-flip-title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.65rem;
  color: #111;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  max-width: 100%;
}

.doc-flip-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.12em;
  width: 100%;
  height: 0.35em;
  background: rgba(229, 0, 0, 0.2);
  z-index: -1;
}

.doc-flip-preview {
  font-family: var(--sans);
  font-size: max(13px, 0.82rem);
  line-height: 1.55;
  color: #333;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-flip-meta {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
  color: #333;
  line-height: 1.35;
}

.doc-flip-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  background: #ffffff;
}

.doc-flip-back-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #111;
  position: relative;
}

.doc-flip-back-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #e50000;
}

.doc-flip-opening {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  color: #111;
}

@media (prefers-reduced-motion: reduce) {
  .doc-flip-card,
  .doc-flip-scene {
    transition: none !important;
  }
}
