.journal-viewer-shell {
  min-height: 100vh;
  background: #060606;
  color: #ffffff;
}

.journal-viewer-book {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.journal-hero-shell {
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.journal-title {
  font-family: "PF Regal Display Pro", Georgia, serif;
  font-size: clamp(2.15rem, 4.1vw, 3.8rem);
  font-weight: 600;
  line-height: 0.98;
  color: #ffffff;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.journal-description {
  max-height: calc(1.75rem * 6);
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  word-break: break-word;
}

.journal-description::-webkit-scrollbar {
  width: 5px;
}

.journal-description::-webkit-scrollbar-track {
  background: transparent;
}

.journal-description::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.journal-cover-summary {
  position: relative;
  border-radius: 24px;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  align-self: start;
  width: 100%;
  max-width: 288px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.journal-cover-summary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.journal-vpn-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: calc(100% - 1.5rem);
  border: 1px solid rgba(232, 175, 81, 0.46);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  padding: 0.42rem 0.6rem 0.42rem 0.72rem;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.journal-vpn-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.journal-vpn-badge__tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.65rem);
  width: min(19rem, 72vw);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #101010;
  padding: 0.75rem 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.journal-vpn-badge:hover .journal-vpn-badge__tooltip {
  opacity: 1;
  transform: translateY(0);
}

.journal-meta-table {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  display: grid;
  grid-auto-rows: 1fr;
}

.journal-meta-table__row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-content: center;
}

.journal-meta-table__row:last-child {
  border-bottom: 0;
}

.journal-meta-table__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.journal-meta-table__value {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.journal-comment-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.journal-comment-reply {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.journal-comment-form {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 360px;
}

.journal-viewer-stage {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 2.5rem 1rem 1.5rem;
}

.journal-external-stage {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.journal-external-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: max(60%, 324px);
  overflow: hidden;
  border-radius: 18px;
  background: #080808;
}

.journal-external-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.journal-viewer-stage::before {
  content: "";
  position: absolute;
  inset: 1rem 9% auto;
  height: calc(100% - 2rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.44), transparent 68%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.34) 50%, rgba(0, 0, 0, 0.14));
  filter: blur(28px);
  opacity: 0.96;
  pointer-events: none;
  z-index: 0;
}

.journal-viewer-stage::after {
  content: "";
  position: absolute;
  top: 1.75rem;
  bottom: 1.75rem;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015),
    rgba(0, 0, 0, 0.18) 18%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.18) 82%,
    rgba(255, 255, 255, 0.015)
  );
  filter: blur(10px);
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
}

.journal-viewer-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  min-height: 70vh;
  margin: 0 auto;
}

.journal-viewer-page {
  position: relative;
  background: #111111;
  overflow: hidden;
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.4),
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 -12px 30px rgba(0, 0, 0, 0.2) inset;
}

.journal-viewer-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.18) 12%, rgba(255, 255, 255, 0.04) 22%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03) 18%, rgba(255, 255, 255, 0) 32%, rgba(0, 0, 0, 0.08) 100%);
  mix-blend-mode: screen;
  opacity: 0.82;
  pointer-events: none;
  z-index: 2;
}

.journal-viewer-page::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

.journal-viewer-page--blank {
  background: transparent;
  box-shadow: none;
}

.journal-viewer-page--blank::before,
.journal-viewer-page--blank::after {
  display: none;
}

.journal-viewer-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-viewer-nav button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.journal-viewer-nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 767px) {
  .journal-hero-shell {
    padding: 1.25rem;
    border-radius: 24px;
  }

  .journal-viewer-frame {
    min-height: 58vh;
  }

  .journal-meta-table__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .journal-meta-table {
    grid-auto-rows: auto;
  }
}
