/* The Shift — 4-Year Report reader */
.shift-page .shift-section {
  width: 100%;
  padding: 3rem 1.25rem 4rem;
  background: var(--bg-community);
  transition: background 0.35s ease;
}
.shift-page .sec-label {
  padding-top: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  color: var(--prose-muted);
}
.shift-page .sec-sub {
  max-width: 44rem;
  margin: 0 auto 1.6rem;
  line-height: 1.6;
}
.shift-wrap {
  max-width: min(96rem, 100%);
  margin: 0 auto;
}

/* ── Chapter chips ── */
.shift-chapters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1.1rem;
}
.shift-chip {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--section-heading);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.shift-chip:hover { border-color: var(--yellow); }
.shift-chip.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #07111e;
}

/* ── Reader shell ── */
.shift-reader {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a1730;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  outline: none;
}
.shift-reader.is-fs {
  position: fixed;
  inset: 0;
  z-index: 3000;
  border-radius: 0;
  border: 0;
}

.shift-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #e8eef7;
}
.shift-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shift-title b { color: var(--yellow); font-weight: 800; }
.shift-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.shift-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.2rem;
  min-width: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #e8eef7;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.shift-tool:hover { background: rgba(255,255,255,0.14); }
.shift-tool[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #07111e;
}
.shift-tool svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Stage ── */
.shift-stage {
  position: relative;
  display: flex;
  height: clamp(460px, calc(100vh - 250px), 940px);
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, #f6f3ec 0%, #e4ddd0 58%, #d4cdc0 100%);
}
.shift-reader.is-fs .shift-stage {
  flex: 1;
  height: auto;
  min-height: 0;
}
.shift-stage.is-zoomed {
  overflow: auto;
  cursor: grab;
}
.shift-book {
  position: relative;
  display: flex;
  margin: auto;
  flex-shrink: 0;
  perspective: 2200px;
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
  perspective: 2400px;
}
.shift-leaf {
  position: relative;
  width: calc(var(--page-h, 600px) * 0.75);
  height: var(--page-h, 600px);
  background: #fff;
  overflow: hidden;
  backface-visibility: hidden;
}
.shift-leaf[hidden] { display: none; }
.shift-leaf img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.shift-leaf--l { border-radius: 4px 0 0 4px; transform-origin: right center; }
.shift-leaf--r { border-radius: 0 4px 4px 0; transform-origin: left center; }
.shift-book.is-single .shift-leaf { border-radius: 4px; }
.shift-leaf.is-clickable { cursor: pointer; }
.shift-flip {
  position: absolute;
  top: 0;
  z-index: 4;
  height: 100%;
  pointer-events: none;
}
.shift-flip.is-right { right: 0; width: 50%; }
.shift-flip.is-left { left: 0; width: 50%; }
.shift-flip.is-full { width: 100%; }
.shift-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: left center;
}
.shift-flip.is-left .shift-flip-inner { transform-origin: right center; }
.shift-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.shift-face-back { transform: rotateY(180deg); }
.shift-fold-shadow { display: none; }

.shift-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.8rem;
  height: 2.8rem;
  margin-top: -1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(12,30,66,0.78);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
}
.shift-nav:hover:not(:disabled) { background: var(--yellow); color: #07111e; }
.shift-nav:disabled { opacity: 0.25; cursor: default; }
.shift-nav svg { width: 20px; height: 20px; }
.shift-prev { left: 0.7rem; }
.shift-next { right: 0.7rem; }

/* ── Bottom bar ── */
.shift-bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem 0.85rem;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #e8eef7;
}
.shift-label {
  min-width: 11rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.shift-range {
  flex: 1;
  height: 1.4rem;
  accent-color: var(--yellow);
  cursor: pointer;
}
.shift-jump {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shift-jump input {
  width: 4rem;
  height: 2rem;
  padding: 0 0.4rem;
  text-align: center;
  border-radius: 0.4rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font: inherit;
}

/* ── Thumbnails ── */
.shift-thumbs {
  position: relative;
  z-index: 6;
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,16,32,0.96);
}
.shift-thumbs[hidden] { display: none; }
.shift-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: 0.6rem;
}
.shift-thumb {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.shift-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shift-thumb span {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 1px 6px;
  font: 700 10px var(--font-display);
  letter-spacing: 0.06em;
  background: rgba(7,17,30,0.85);
  color: #fff;
}
.shift-thumb.is-current { border-color: var(--yellow); }
.shift-thumb:hover { border-color: #fff; }

.shift-hint {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--section-muted);
}

@media (max-width: 760px) {
  .shift-page .shift-section { padding: 2rem 0.6rem 3rem; }
  .shift-title { font-size: 0.72rem; }
  .shift-tool span { display: none; }
  .shift-tool { padding: 0; width: 2.2rem; }
  .shift-stage { height: clamp(420px, calc(100svh - 230px), 760px); padding: 0.6rem; }
  .shift-nav { width: 2.4rem; height: 2.4rem; margin-top: -1.2rem; }
  .shift-prev { left: 0.3rem; }
  .shift-next { right: 0.3rem; }
  .shift-bottom { flex-wrap: wrap; gap: 0.4rem 0.8rem; }
  .shift-label { min-width: 0; flex: 1 0 100%; text-align: center; order: -1; }
  .shift-jump { display: none; }
  .shift-chip { font-size: 0.72rem; padding: 0.38rem 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .shift-nav, .shift-chip, .shift-tool { transition: none; }
}

.shift-leaf { touch-action: pan-y; }
.shift-stage.is-turning, .shift-stage.is-turning .shift-leaf { cursor: grabbing; }
.shift-book:not(.is-single) .shift-leaf.is-clickable { cursor: grab; }
