    /* Light “PDF.js-ish” layout */
    body {
      margin: 0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background: #2a2a2a;
    }

    .toolbar {
      position: sticky;
      top: 0;
      z-index: 10;
      display: flex;
      align-items: center;
      gap: .5rem;
      padding: .5rem .75rem;
      background: #323639;
      color: #fff;
      border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .toolbar button,
    .toolbar input {
      height: 32px;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, .18);
      background: #3f454a;
      color: #fff;
    }

    .toolbar button {
      padding: 0 .6rem;
      cursor: pointer;
    }

    .toolbar button:disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .toolbar input {
      width: 64px;
      text-align: center;
    }

    .wrap {
      display: grid;
      place-items: start center;
      padding: 16px;
    }

    .page {
      background: #fff;
      box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
      margin: 12px 0;
    }

    canvas {
      display: block;
    }

    /* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(42, 42, 42, 0.9);
  backdrop-filter: blur(2px);
}

.preloader.is-hidden {
  display: none;
}

.preloader__panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: #323639;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  min-width: 280px;
}

.preloader__spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: rgba(255,255,255,.95);
  animation: spin .9s linear infinite;
}

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

.preloader__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.preloader__meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  opacity: .85;
  margin-bottom: 8px;
}

.preloader__bar {
  width: 260px;
  max-width: 60vw;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}

.preloader__barFill {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,.85);
  transition: width .12s linear;
}
