/* Immersive magazine reader — open book (left + right) */

/* Content protection (deterrent — not absolute) */
.reader-protected {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.reader-protected img,
.reader-protected canvas,
.reader-protected .flipbook-wrap,
.reader-protected .page-inner {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto;
}

.reader-shield {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: #0a0908;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s linear, visibility 0.08s linear;
}

.reader-protected-hidden .reader-shield {
  opacity: 1;
  visibility: visible;
}

.reader-watermark { display: none !important; }

@media print {
  .reader-body,
  .reader-protect-host,
  .flipbook-wrap,
  .reader-stage {
    display: none !important;
  }
  body::after {
    content: "";
    display: block;
    position: fixed;
    inset: 0;
    background: #000;
  }
}


.reader-loading-screen {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  color: rgba(255, 250, 242, 0.85);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.reader-spinner {
  position: relative;
  width: 52px;
  height: 52px;
}

.reader-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #e68a45;
  border-right-color: rgba(230, 138, 69, 0.35);
  animation: reader-spin 0.85s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite;
}

.reader-spinner-ring:nth-child(2) {
  inset: 8px;
  border-top-color: #f5d9b8;
  border-right-color: transparent;
  animation-direction: reverse;
  animation-duration: 1.15s;
}

@keyframes reader-spin {
  to { transform: rotate(360deg); }
}

.reader-page-loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: rgba(14, 12, 10, 0.42);
  backdrop-filter: blur(6px);
  color: rgba(255, 250, 242, 0.9);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.reader-page-loader[hidden] {
  display: none !important;
}

.reader-page-loader p {
  margin: 0;
}

.reader-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(90, 70, 45, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(0, 0, 0, 0.45), transparent 50%),
    linear-gradient(180deg, #2c241c 0%, #1a1510 45%, #0e0c0a 100%);
  font-family: var(--sans, system-ui, sans-serif);
}

.reader-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reader-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  background: rgba(12, 10, 8, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  z-index: 20;
}

.reader-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 140px;
}

.reader-brand-wrap img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

.reader-brand-wrap span {
  font: 600 0.95rem var(--serif, Georgia, serif);
}

.reader-nav-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reader-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
}

.reader-nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.reader-page-label {
  min-width: 120px;
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
}

.reader-toolset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: flex-end;
}

.reader-toolset button,
.reader-toolset a.tool {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.reader-toolset button:hover,
.reader-toolset a.tool:hover {
  background: rgba(230, 138, 69, 0.85);
}

.reader-content-clean {
  display: block;
  height: calc(100% - 58px);
  min-height: 0;
}

.reader-stage {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 28px 72px 48px;
}

.flip-desk {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 4%;
  height: 22%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.flipbook-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55));
}

#flipbook {
  margin: 0 auto;
}

/* Soft page paper */
.flip-page {
  background: #fffaf2;
  color: #2a3540;
  overflow: hidden;
}

.flip-page.--hard {
  background: #1a365d;
}

.page-inner {
  height: 100%;
  width: 100%;
  padding: clamp(28px, 4.5vw, 44px) clamp(26px, 4vw, 40px) 40px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03), transparent 8%),
    #fffaf2;
}

.page-inner.right-side {
  background:
    linear-gradient(270deg, rgba(0, 0, 0, 0.03), transparent 8%),
    linear-gradient(90deg, #efe6d8 0%, #fffaf2 7%);
}

.page-inner.left-side {
  background:
    linear-gradient(90deg, transparent 92%, rgba(0, 0, 0, 0.04)),
    linear-gradient(270deg, #efe6d8 0%, #fffaf2 7%);
}

.page-inner.cover-inner {
  padding: 0;
  background: #122846;
}

.page-inner.blank-page {
  background: #fffaf2;
}

.page-inner h1 {
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  color: #1a365d;
  margin: 0.15em 0 0.55em;
  line-height: 1.18;
  font-weight: 600;
}

.page-inner .eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #e68a45;
  margin-bottom: 0.55rem;
  font-family: var(--sans, system-ui, sans-serif);
}

.page-dek {
  font: italic 1.02rem / 1.45 var(--serif, Georgia, serif);
  color: #5a6670;
  margin: 0 0 1rem !important;
}

.page-body p {
  font: 0.98rem / 1.7 var(--serif, Georgia, serif);
  color: #34414a;
  margin: 0 0 0.85em;
}

.page-figure {
  margin: 0 0 12px;
  --img-scale: 70;
}

.page-figure img.page-image {
  display: block;
  width: calc(var(--img-scale) * 1%);
  max-width: 100%;
  height: auto;
  max-height: calc(80px + var(--img-scale) * 2.2px);
  object-fit: cover;
  border-radius: 2px;
  margin-inline: auto;
}

.page-figure figcaption {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #6b7680;
  text-align: center;
}

.page-split {
  display: grid;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.page-split-left,
.page-split-right {
  grid-template-columns: 1fr 1fr;
}

.page-split-right .page-figure { order: 2; }
.page-split-right .page-body { order: 1; }

.page-split .page-figure {
  margin: 0;
}

.page-split .page-figure img.page-image {
  width: 100%;
  max-height: calc(120px + var(--img-scale) * 1.6px);
}

.page-layout-top .page-figure-top img.page-image,
.page-layout-bottom .page-figure-bottom img.page-image {
  width: calc(var(--img-scale) * 1%);
}

.page-number {
  position: absolute;
  bottom: 16px;
  color: #9aa3ab;
  font: 0.7rem var(--sans, system-ui, sans-serif);
  letter-spacing: 0.06em;
}

.page-inner.left-side .page-number { left: 28px; }
.page-inner.right-side .page-number { right: 28px; }

.reader-cover-art,
.reader-cover-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-page {
  padding: 0 !important;
}

.layout-photo {
  margin: 0;
  position: absolute;
  inset: 0;
}

.layout-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-photo figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 250, 242, 0.92);
  padding: 8px 12px;
  font-size: 0.72rem;
  color: #445;
  border-radius: 6px;
}

.toc-simple {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.toc-simple li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #e8dfd0;
  font-family: var(--serif, Georgia, serif);
}

.toc-simple button {
  border: 0;
  background: none;
  color: #1a365d;
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.toc-simple button:hover { color: #e68a45; }

.toc-simple span {
  color: #9aa3ab;
  font-size: 0.8rem;
}

.reader-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  height: 52px;
  width: 52px;
  background: rgba(255, 250, 242, 0.95);
  color: #1a365d;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: 1.55rem;
  transition: transform 0.2s, background 0.2s;
}

.reader-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: #fff;
}

.reader-arrow.prev { left: 18px; }
.reader-arrow.next { right: 18px; }

.reader-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.03em;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
  animation: hint-fade 5s ease forwards;
}

@keyframes hint-fade {
  0%, 55% { opacity: 1; }
  100% { opacity: 0; }
}

.reader-panel {
  position: fixed;
  right: 0;
  top: 58px;
  bottom: 0;
  width: min(340px, 90vw);
  background: #fffaf2;
  color: #2a3540;
  z-index: 30;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.3);
  padding: 22px;
  overflow: auto;
  transform: translateX(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reader-panel.open { transform: translateX(0); }

.reader-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8e2d6;
  padding-bottom: 12px;
  margin-bottom: 10px;
}

.reader-panel-head h3 {
  margin: 0;
  color: #1a365d;
  font-family: var(--serif, Georgia, serif);
}

.reader-panel-head button {
  border: 0;
  background: none;
  font-size: 1.4rem;
  color: #6b7680;
  cursor: pointer;
}

.reader-panel .contents-link {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid #e8e2d6;
  background: none;
  color: #1a365d;
  font-weight: 500;
  cursor: pointer;
}

.reader-panel .contents-link.active,
.reader-panel .contents-link:hover {
  color: #e68a45;
}

.reader-scrim {
  display: none;
  position: fixed;
  inset: 58px 0 0;
  background: rgba(10, 8, 6, 0.5);
  z-index: 25;
}

.reader-scrim.open { display: block; }

@media (max-width: 900px) {
  .reader-stage { padding: 16px 52px 40px; }
  .reader-arrow { width: 44px; height: 44px; font-size: 1.3rem; }
  .reader-arrow.prev { left: 8px; }
  .reader-arrow.next { right: 8px; }
  .reader-brand-wrap span { display: none; }
  .reader-hint { display: none; }
  .page-body p { font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reader-hint { animation: none; opacity: 0; }
}

.locked-page{display:flex;flex-direction:column;justify-content:center;gap:12px;background:linear-gradient(165deg,#f4f1ec,#e8eef2);min-height:100%}
.locked-page h1{font-size:1.6rem}
.reader-preview-banner{background:#1a2a36;color:#f3f6f8;text-align:center;padding:8px 12px;font-size:.85rem}
.reader-preview-banner a{color:#e68a45;font-weight:600}
.reader-gate{max-width:420px;margin:12vh auto;text-align:center;padding:2rem;letter-spacing:normal;word-spacing:normal}
.reader-gate h1,.reader-gate p{letter-spacing:normal}
.reader-panel .contents-link.locked{opacity:.55}
