.pdf-upload-panel {
  margin: 1rem 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  color: #172033;
}

.pdf-upload-summary,
.pdf-current-file,
.pdf-post-card,
.pdf-reader-page-head,
.pdf-reader-toolbar,
.pdf-toolbar-group {
  display: flex;
  align-items: center;
}

.pdf-upload-summary {
  gap: .9rem;
  min-height: 92px;
  padding: 1rem 1.15rem;
  list-style: none;
  cursor: pointer;
  background: #ffffff;
  transition: background .18s ease;
}

.pdf-upload-summary::-webkit-details-marker { display: none; }
.pdf-upload-summary::marker { content: ""; }
.pdf-upload-summary:hover { background: #f8faff; }
.pdf-upload-summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--world-accent, #2563eb) 55%, transparent);
  outline-offset: -3px;
}

.pdf-upload-summary-copy { min-width: 0; flex: 1; }
.pdf-upload-summary-copy > span,
.pdf-upload-summary-copy > strong,
.pdf-upload-summary-copy > small { display: block; }

.pdf-upload-summary-copy .eyebrow {
  display: inline-flex;
  width: auto;
  margin-bottom: .25rem;
  padding: .2rem .62rem;
  border-radius: 999px;
  background: #edf3ff;
  color: #1557d6;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.pdf-upload-summary-copy > strong {
  overflow: hidden;
  color: #172033;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-upload-summary-copy > small {
  margin-top: .2rem;
  color: #64748b;
  line-height: 1.4;
}

.pdf-upload-summary-action {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #172033;
  font-size: .88rem;
  font-weight: 850;
  white-space: nowrap;
}

.pdf-upload-summary-action i {
  width: .65rem;
  height: .65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}
.pdf-upload-panel[open] > .pdf-upload-summary .pdf-upload-summary-action i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.pdf-upload-body {
  padding: 1.15rem;
  border-top: 1px solid #e4eaf2;
  background: #f8fafc;
}

.pdf-post-copy h3,
.pdf-post-copy p,
.pdf-reader-page-head h1,
.pdf-reader-page-head p { margin: 0; }

.pdf-file-badge {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff5f73, #df3155);
  box-shadow: 0 10px 24px rgba(217, 45, 79, .2);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.pdf-current-file {
  gap: .75rem;
  padding: .85rem;
  margin-bottom: 1rem;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #ffffff;
}
.pdf-current-file-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  border-radius: 8px;
  color: #c92547;
  background: #ffe7ed;
  font-size: 1.35rem;
}
.pdf-current-file > div:nth-child(2) { min-width: 0; flex: 1; }
.pdf-current-file strong,
.pdf-current-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-current-file span,
.pdf-current-file a { color: #64748b; font-size: .86rem; }

.pdf-file-picker {
  display: block;
  padding: 1rem;
  border: 1px dashed #aebdd0;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.pdf-file-picker:hover,
.pdf-file-picker:focus-within {
  border-color: var(--world-accent, #2563eb);
  background: #f5f8ff;
}
.pdf-file-picker > span,
.pdf-file-picker > small { display: block; }
.pdf-file-picker > span { font-weight: 850; }
.pdf-file-picker > small { margin-top: .35rem; color: #64748b; }
.pdf-file-picker input {
  width: 100%;
  margin-top: .7rem;
  padding: .68rem .75rem;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #172033;
}

.pdf-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.pdf-control-grid label { margin: 0; color: #172033; font-weight: 800; }
.pdf-control-grid select {
  width: 100%;
  margin-top: .42rem;
  background: #ffffff;
  color: #172033;
  border-color: #cfd9e6;
}
.pdf-control-grid .form-help {
  display: block;
  margin-top: .42rem;
  color: #64748b;
  font-weight: 400;
  line-height: 1.45;
}

.pdf-download-choice,
.pdf-remove-choice,
.pdf-indexing-choice {
  display: flex !important;
  align-items: flex-start !important;
  gap: .72rem;
  margin-top: .95rem;
  padding: .9rem 1rem;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
}
.pdf-download-choice input,
.pdf-remove-choice input,
.pdf-indexing-choice input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: .15rem 0 0;
}
.pdf-download-choice span strong,
.pdf-download-choice span small,
.pdf-indexing-choice span strong,
.pdf-indexing-choice span small,
.pdf-remove-choice span strong,
.pdf-remove-choice span small { display: block; }
.pdf-download-choice span small,
.pdf-indexing-choice span small,
.pdf-remove-choice span small {
  margin-top: .18rem;
  color: #64748b;
  font-weight: 400;
  line-height: 1.42;
}
.pdf-remove-choice { color: #b4233f; border-color: #f0c8d1; background: #fff8fa; }

.pdf-share-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  margin-top: .9rem;
  padding: .75rem;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #172033;
  font-size: .88rem;
}
.pdf-share-row > span:first-child { font-weight: 800; }
.pdf-share-row small { color: #64748b; }

.pdf-post-card {
  position: relative;
  gap: 1.15rem;
  padding: 1.3rem 1.35rem;
  margin: 1.15rem 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--world-accent, #2563eb) 24%, #d8e1ee);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--world-accent, #2563eb) 10%, transparent), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .09);
  color: #172033;
}

.pdf-post-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--world-accent, #2563eb), color-mix(in srgb, var(--world-accent, #2563eb) 45%, #9cc5ff));
}

.pdf-post-art {
  position: relative;
  display: grid;
  flex: 0 0 88px;
  place-items: center;
  width: 88px;
  height: 110px;
  border: 1px solid #d8e2ef;
  border-radius: 9px 16px 16px 9px;
  background: linear-gradient(145deg, #ffffff, #eef3fa);
  box-shadow: -6px 6px 0 #d7e1ee, 0 12px 24px rgba(15, 23, 42, .14);
  transform: rotate(-2deg);
}

.pdf-post-art::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d1dbea;
}

.pdf-post-art span {
  color: #d92d4f;
  font-weight: 950;
  letter-spacing: .09em;
}

.pdf-post-art i {
  position: absolute;
  left: 23px;
  right: 15px;
  height: 3px;
  border-radius: 999px;
  background: #b8c5d8;
}

.pdf-post-art i:nth-of-type(1) { bottom: 29px; }
.pdf-post-art i:nth-of-type(2) { bottom: 21px; }
.pdf-post-art i:nth-of-type(3) { bottom: 13px; right: 30px; }

.pdf-post-copy {
  min-width: 0;
  flex: 1;
}

.pdf-post-card .eyebrow {
  margin: 0 0 .45rem;
  padding: .26rem .65rem;
  border: 1px solid color-mix(in srgb, var(--world-accent, #2563eb) 20%, #dce6f3);
  border-radius: 999px;
  background: color-mix(in srgb, var(--world-accent, #2563eb) 9%, #ffffff);
  color: color-mix(in srgb, var(--world-accent, #2563eb) 78%, #17365f);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.pdf-post-copy h3 {
  color: #13203a;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.24;
}

.pdf-post-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin-top: .42rem;
  color: #5f6f86;
  line-height: 1.5;
}

.pdf-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-top: .78rem;
  color: #52637a;
  font-size: .78rem;
}

.pdf-post-meta span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: .25rem .55rem;
  overflow-wrap: anywhere;
  border: 1px solid #e0e7f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
}

.pdf-post-meta span + span::before {
  content: none;
}

.pdf-post-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: .55rem;
  min-width: 150px;
}

.pdf-post-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  white-space: nowrap;
}

.pdf-post-actions .button.ghost {
  border: 1px solid #cfd9e7;
  background: #ffffff;
  color: #24354f;
  box-shadow: none;
}

.pdf-post-actions .button.ghost:hover {
  border-color: color-mix(in srgb, var(--world-accent, #2563eb) 45%, #cfd9e7);
  background: #f4f7fb;
}

.pdf-open-button {
  box-shadow: 0 9px 22px color-mix(in srgb, var(--world-accent, #2563eb) 22%, transparent);
}

.pdf-reader-page {
  width: min(1480px, calc(100% - 1.5rem));
  margin: 0 auto 2rem;
}

.pdf-reader-page-head {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.1rem;
}

.pdf-reader-page-head h1 {
  max-width: 1000px;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
}

.pdf-reader-page-head > div > p:last-child {
  margin-top: .25rem;
  color: var(--muted, #a8b2c5);
}

.pdf-reader-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  margin-bottom: .55rem;
  color: var(--muted, #a8b2c5);
  font-size: .88rem;
}

.pdf-reader-breadcrumb span::before {
  content: "/";
  margin-right: .7rem;
  opacity: .45;
}

.pdf-flipbook-shell {
  --pdf-toolbar-height: 62px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 22px;
  background: #0a0f1c;
  box-shadow: 0 30px 80px rgba(2, 6, 23, .42);
}

.pdf-reader-toolbar {
  position: relative;
  z-index: 30;
  min-height: var(--pdf-toolbar-height);
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid rgba(148, 163, 184, .17);
  background: rgba(15, 23, 42, .96);
  backdrop-filter: blur(18px);
  flex-wrap: wrap;
}

.pdf-toolbar-group {
  gap: .45rem;
}

.pdf-toolbar-view {
  justify-content: center;
}

.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.pdf-zoom-controls output {
  min-width: 50px;
  color: #c7d2e3;
  font-size: .78rem;
  font-weight: 800;
  text-align: center;
}

.pdf-reader-body {
  position: relative;
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr);
  min-width: 0;
  transition: grid-template-columns .2s ease;
}

.pdf-flipbook-shell.is-thumbnails-open .pdf-reader-body {
  grid-template-columns: 190px minmax(0, 1fr);
}

.pdf-thumbnail-rail {
  position: relative;
  z-index: 28;
  display: flex;
  min-width: 0;
  height: clamp(560px, 73vh, 930px);
  overflow: hidden;
  flex-direction: column;
  border-right: 1px solid rgba(148, 163, 184, .18);
  background: #0c1322;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
}

.pdf-flipbook-shell.is-thumbnails-open .pdf-thumbnail-rail {
  opacity: 1;
  visibility: visible;
}

.pdf-thumbnail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: .55rem .7rem;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  color: #dce5f3;
}

.pdf-thumbnail-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #dce5f3;
  background: rgba(51, 65, 85, .72);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.pdf-thumbnail-list {
  display: flex;
  min-height: 0;
  overflow: auto;
  flex: 1;
  flex-direction: column;
  gap: .65rem;
  padding: .7rem;
  scrollbar-color: #475569 #0c1322;
}

.pdf-thumbnail-button {
  display: grid;
  width: 100%;
  min-height: 154px;
  place-items: center;
  gap: .3rem;
  padding: .55rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 11px;
  color: #aebbd0;
  background: rgba(30, 41, 59, .55);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}

.pdf-thumbnail-button canvas {
  display: block;
  max-width: 100%;
  max-height: 128px;
  width: auto;
  height: auto;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}

.pdf-thumbnail-button.is-active {
  border-color: #6aa6ff;
  color: #fff;
  background: rgba(59, 130, 246, .2);
  box-shadow: 0 0 0 2px rgba(106, 166, 255, .2);
}

.pdf-tool-button {
  min-width: 42px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: .52rem .72rem;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 10px;
  color: #e9eff8;
  background: rgba(30, 41, 59, .82);
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.pdf-tool-button:hover:not(:disabled),
.pdf-tool-button:focus-visible {
  border-color: rgba(106, 166, 255, .75);
  background: rgba(51, 65, 85, .95);
  transform: translateY(-1px);
}

.pdf-tool-button:disabled {
  opacity: .36;
  cursor: default;
}

.pdf-tool-button-labeled {
  display: inline-flex;
  gap: .42rem;
}

.pdf-tool-button-labeled span {
  font-size: 1.35rem;
  line-height: .8;
}

.pdf-page-counter {
  display: flex;
  align-items: center;
  gap: .42rem;
  min-height: 40px;
  padding: .3rem .6rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 10px;
  color: #bac5d6;
  background: rgba(2, 6, 23, .48);
  font-size: .84rem;
}

.pdf-page-counter input {
  width: 58px;
  min-height: 30px;
  padding: .2rem .35rem;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: rgba(51, 65, 85, .82);
  text-align: center;
  font: inherit;
  font-weight: 800;
}

.pdf-reader-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(560px, 73vh, 930px);
  min-height: 0;
  overflow: hidden;
  outline: none;
  background:
    radial-gradient(ellipse at center, rgba(71, 85, 105, .4), transparent 62%),
    linear-gradient(145deg, #121a2a, #050812 72%);
  touch-action: pan-y;
  user-select: none;
}

.pdf-preview-banner {
  position: absolute;
  z-index: 17;
  top: .7rem;
  left: 50%;
  padding: .38rem .72rem;
  border: 1px solid rgba(251, 191, 36, .28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, .74);
  transform: translateX(-50%);
  font-size: .76rem;
  font-weight: 800;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.pdf-reader-stage::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 3.5%;
  height: 5%;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  filter: blur(20px);
}

.pdf-book {
  --pdf-zoom: 1;
  --pdf-pan-x: 0px;
  --pdf-pan-y: 0px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(94%, 1320px);
  height: 91%;
  perspective: 2600px;
  transform-style: preserve-3d;
  transform: translate3d(var(--pdf-pan-x), var(--pdf-pan-y), 0) scale(var(--pdf-zoom));
  transform-origin: center;
  transition: transform .18s ease;
}

.pdf-flipbook-shell.is-pdf-zoomed .pdf-reader-stage {
  touch-action: none;
}

.pdf-flipbook-shell.is-pdf-zoomed .pdf-book {
  cursor: grab;
}

.pdf-flipbook-shell.is-pdf-panning .pdf-book {
  cursor: grabbing;
  transition: none;
}

.pdf-page-slot {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  transform-style: preserve-3d;
}

.pdf-page-slot-left {
  justify-items: end;
  filter: drop-shadow(-14px 14px 22px rgba(0, 0, 0, .34));
}

.pdf-page-slot-right {
  justify-items: start;
  filter: drop-shadow(14px 14px 22px rgba(0, 0, 0, .34));
}

.pdf-page-paper,
.pdf-page-turn-paper {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  background: #fff;
  backface-visibility: hidden;
}

.pdf-page-slot-left .pdf-page-paper {
  border-radius: 7px 1px 1px 7px;
  box-shadow: inset -16px 0 26px rgba(15, 23, 42, .09);
}

.pdf-page-slot-right .pdf-page-paper {
  border-radius: 1px 7px 7px 1px;
  box-shadow: inset 16px 0 26px rgba(15, 23, 42, .08);
}

.pdf-page-slot.is-blank .pdf-page-paper {
  background: linear-gradient(90deg, rgba(30, 41, 59, .08), rgba(255, 255, 255, .02));
  box-shadow: none;
  opacity: .16;
}

.pdf-page-slot canvas,
.pdf-page-turn-overlay canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  background: #fff;
}

.pdf-page-number {
  position: absolute;
  bottom: .4rem;
  z-index: 3;
  min-width: 28px;
  padding: .16rem .4rem;
  border-radius: 999px;
  color: rgba(15, 23, 42, .7);
  background: rgba(255, 255, 255, .75);
  font-size: .72rem;
  text-align: center;
}

.pdf-page-slot-left .pdf-page-number { left: .5rem; }
.pdf-page-slot-right .pdf-page-number { right: .5rem; }
.pdf-page-slot.is-blank .pdf-page-number { display: none; }

.pdf-book-spine {
  position: absolute;
  z-index: 15;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 16px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(255, 255, 255, .14), rgba(0, 0, 0, .2));
  filter: blur(2px);
  opacity: .7;
}

.pdf-page-turn-overlay {
  position: absolute;
  z-index: 20;
  top: 0;
  bottom: 0;
  width: 50%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.pdf-page-turn-overlay.is-next {
  right: 0;
  transform-origin: left center;
  animation: pdf-turn-next .58s cubic-bezier(.3, .02, .18, 1) forwards;
}

.pdf-page-turn-overlay.is-prev {
  left: 0;
  transform-origin: right center;
  animation: pdf-turn-prev .58s cubic-bezier(.3, .02, .18, 1) forwards;
}

.pdf-page-turn-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, rgba(2, 6, 23, .32));
  backface-visibility: hidden;
}

@keyframes pdf-turn-next {
  0% { transform: rotateY(0deg); filter: drop-shadow(12px 12px 18px rgba(0, 0, 0, .34)); }
  55% { filter: drop-shadow(-18px 15px 24px rgba(0, 0, 0, .48)); }
  100% { transform: rotateY(-180deg); filter: drop-shadow(-5px 8px 10px rgba(0, 0, 0, .2)); }
}

@keyframes pdf-turn-prev {
  0% { transform: rotateY(0deg); filter: drop-shadow(-12px 12px 18px rgba(0, 0, 0, .34)); }
  55% { filter: drop-shadow(18px 15px 24px rgba(0, 0, 0, .48)); }
  100% { transform: rotateY(180deg); filter: drop-shadow(5px 8px 10px rgba(0, 0, 0, .2)); }
}

.pdf-page-edge {
  position: absolute;
  z-index: 18;
  top: 50%;
  display: grid;
  width: 48px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transform: translateY(-50%);
  font-size: 2rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.pdf-page-edge:disabled { opacity: .22; cursor: default; }
.pdf-page-edge-prev { left: .7rem; }
.pdf-page-edge-next { right: .7rem; }

.pdf-reader-loading,
.pdf-reader-error {
  position: absolute;
  z-index: 40;
  display: grid;
  width: min(420px, calc(100% - 2rem));
  place-items: center;
  padding: 1.4rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  color: #e8eef8;
  background: rgba(15, 23, 42, .92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .4);
  text-align: center;
  backdrop-filter: blur(16px);
}

.pdf-reader-loading p,
.pdf-reader-error p {
  margin: .35rem 0 0;
  color: #aab6ca;
}

.pdf-reader-spinner {
  width: 36px;
  height: 36px;
  margin-bottom: .8rem;
  border: 3px solid rgba(148, 163, 184, .28);
  border-top-color: #6aa6ff;
  border-radius: 50%;
  animation: pdf-spin .8s linear infinite;
}

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

.pdf-reader-hint {
  position: absolute;
  z-index: 17;
  bottom: .8rem;
  left: 50%;
  padding: .4rem .75rem;
  border-radius: 999px;
  color: rgba(226, 232, 240, .85);
  background: rgba(2, 6, 23, .68);
  transform: translateX(-50%);
  font-size: .78rem;
  pointer-events: none;
  transition: opacity .3s ease;
}

.pdf-reader-hint.is-dismissed { opacity: 0; }

.pdf-reader-status {
  min-height: 34px;
  padding: .5rem .8rem;
  border-top: 1px solid rgba(148, 163, 184, .12);
  color: #9ca9bd;
  background: #0c1220;
  font-size: .8rem;
  text-align: center;
}

.pdf-flipbook-shell:fullscreen,
.pdf-flipbook-shell.is-fallback-fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #050812;
}

.pdf-flipbook-shell:fullscreen .pdf-reader-stage,
.pdf-flipbook-shell.is-fallback-fullscreen .pdf-reader-stage {
  height: calc(100vh - var(--pdf-toolbar-height) - 34px);
}

.pdf-flipbook-shell:fullscreen .pdf-thumbnail-rail,
.pdf-flipbook-shell.is-fallback-fullscreen .pdf-thumbnail-rail {
  height: calc(100vh - var(--pdf-toolbar-height) - 34px);
}

.pdf-flipbook-shell.is-fallback-fullscreen {
  position: fixed;
  z-index: 9999;
  inset: 0;
}

body.pdf-reader-no-scroll { overflow: hidden; }

@media (max-width: 880px) {
  .pdf-control-grid { grid-template-columns: 1fr; }
  .pdf-post-card { align-items: flex-start; flex-wrap: wrap; }
  .pdf-post-copy { flex-basis: calc(100% - 112px); }
  .pdf-post-actions { width: 100%; min-width: 0; flex-direction: row; }
  .pdf-post-actions .button { flex: 1; text-align: center; }

  .pdf-reader-toolbar { align-items: stretch; flex-direction: column; }
  .pdf-toolbar-group { justify-content: center; }
  .pdf-toolbar-actions { position: absolute; top: .65rem; right: .65rem; }
  .pdf-toolbar-actions .pdf-tool-link { font-size: .78rem; }
  .pdf-toolbar-navigation { padding-top: 48px; }
  .pdf-toolbar-view { width: 100%; }
  .pdf-tool-button-labeled { font-size: 0; }
  .pdf-tool-button-labeled span { font-size: 1.55rem; }

  .pdf-reader-stage { height: min(72vh, 760px); min-height: 430px; }
  .pdf-book { grid-template-columns: minmax(0, 1fr); width: min(90%, 680px); height: 92%; }
  .pdf-page-slot-left { display: none; }
  .pdf-page-slot-right { grid-column: 1; justify-items: center; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .4)); }
  .pdf-page-slot-right .pdf-page-paper { border-radius: 7px; box-shadow: inset 10px 0 22px rgba(15, 23, 42, .08); }
  .pdf-book-spine { display: none; }
  .pdf-page-turn-overlay { width: 100%; }
  .pdf-page-turn-overlay.is-prev { display: block; }
  .pdf-page-edge { width: 42px; height: 64px; }
  .pdf-reader-hint { max-width: calc(100% - 7rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .pdf-flipbook-shell { --pdf-toolbar-height: 156px; }
  .pdf-reader-body { display: block; }
  .pdf-thumbnail-rail {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(210px, 72vw);
    box-shadow: 18px 0 45px rgba(0, 0, 0, .45);
    transform: translateX(-102%);
    transition: transform .2s ease, opacity .18s ease;
  }
  .pdf-flipbook-shell.is-thumbnails-open .pdf-thumbnail-rail { transform: translateX(0); }
}

@media (max-width: 560px) {
  .pdf-upload-summary { gap: .75rem; padding: .9rem; }
  .pdf-upload-summary-action > span { display: none; }
  .pdf-upload-body { padding: .9rem; }
  .pdf-file-badge { width: 46px; }
  .pdf-reader-page { width: 100%; }
  .pdf-reader-page-head { padding-inline: .8rem; }
  .pdf-flipbook-shell { border-inline: 0; border-radius: 0; }
  .pdf-reader-toolbar { padding-inline: .45rem; }
  .pdf-tool-button { min-width: 38px; padding-inline: .5rem; }
  .pdf-toolbar-view > [data-pdf-thumbnails-toggle] { font-size: 0; }
  .pdf-toolbar-view > [data-pdf-thumbnails-toggle]::after { content: "Pages"; font-size: .82rem; }
  .pdf-zoom-controls [data-pdf-zoom-reset] { display: none; }
  .pdf-toolbar-actions [data-pdf-sound] { font-size: 0; }
  .pdf-toolbar-actions [data-pdf-sound]::after { content: "Sound"; font-size: .78rem; }
  .pdf-toolbar-actions .pdf-tool-link { font-size: 0; }
  .pdf-toolbar-actions .pdf-tool-link::after { content: "PDF"; font-size: .78rem; }
  .pdf-page-counter { padding-inline: .4rem; }
  .pdf-page-counter input { width: 48px; }
  .pdf-page-edge { top: auto; bottom: .55rem; width: 44px; height: 44px; transform: none; border-radius: 50%; }
  .pdf-page-edge-prev { left: .55rem; }
  .pdf-page-edge-next { right: .55rem; }
  .pdf-reader-hint { display: none; }

  .pdf-post-card { gap: .9rem; padding: 1.05rem; border-radius: 18px; }
  .pdf-post-art { flex-basis: 66px; width: 66px; height: 84px; box-shadow: -4px 4px 0 #d7e1ee, 0 9px 18px rgba(15, 23, 42, .12); }
  .pdf-post-art i { left: 18px; right: 11px; }
  .pdf-post-copy { flex-basis: calc(100% - 82px); }
  .pdf-post-copy h3 { font-size: 1.05rem; }
  .pdf-post-copy > p:not(.eyebrow) { font-size: .9rem; }
  .pdf-post-meta { gap: .35rem; }
  .pdf-post-meta span { border-radius: 10px; }
  .pdf-post-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-page-turn-overlay.is-next,
  .pdf-page-turn-overlay.is-prev { animation-duration: .01ms; }
  .pdf-reader-spinner { animation-duration: 1.8s; }
}

.theme-light .pdf-upload-panel {
  background: linear-gradient(145deg, rgba(248, 250, 252, .98), rgba(226, 232, 240, .72));
}

.theme-light .pdf-current-file {
  background: rgba(255, 255, 255, .75);
}
.pdf-upload-panel [hidden],
.pdf-flipbook-shell [hidden] {
  display: none !important;
}
