/* ============================================================
   REPORTING PAGE
   Layout: sidebar (reports list) + editor (title + blocks).
   ============================================================ */

.reporting-page {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  min-height: calc(100vh - 220px);
}

/* ---- Sidebar ---- */
.reporting-sidebar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.reporting-sidebar-header { display: flex; }
.reporting-new-btn {
  width: 100%;
  background: #5b7fff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.reporting-new-btn:hover { background: #4a6fee; }

.reporting-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.reporting-list-loading {
  text-align: center;
  color: #6b7280;
  padding: 1rem;
  font-size: 0.8rem;
}
.reporting-list-item {
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.reporting-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.reporting-list-item.active {
  background: rgba(91, 127, 255, 0.12);
  border-color: rgba(91, 127, 255, 0.4);
}
.reporting-list-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e4e6eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reporting-list-meta {
  font-size: 0.7rem;
  color: #9aa1ad;
  margin-top: 2px;
}

/* ---- Editor canvas ---- */
.reporting-editor {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.25rem;
  min-height: 400px;
}

.reporting-empty {
  text-align: center;
  color: #6b7280;
  padding: 3rem 1rem;
  font-size: 0.9rem;
}
.reporting-empty p { margin: 0.35rem 0; }

.reporting-doc-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.reporting-title-input {
  flex: 1;
  min-width: 240px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.reporting-title-input:focus { outline: 1px solid rgba(91, 127, 255, 0.5); border-color: rgba(91, 127, 255, 0.5); }

.reporting-save-status {
  font-size: 0.75rem;
  color: #9aa1ad;
  min-width: 90px;
}

.reporting-doc-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.reporting-doc-actions .btn-secondary {
  font-size: 0.75rem !important;
  padding: 0.4rem 0.7rem !important;
}
.reporting-danger {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
.reporting-danger:hover {
  background: rgba(248, 113, 113, 0.2) !important;
}

/* ---- Block list ---- */
.reporting-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.reporting-blocks-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.reporting-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  transition: opacity 0.15s ease;
}
.reporting-block.dragging { opacity: 0.4; }
.reporting-block.drop-target { border-color: rgba(91, 127, 255, 0.6); }

.reporting-block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.reporting-block-drag {
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: grab;
  user-select: none;
}
.reporting-block-drag:active { cursor: grabbing; }
.reporting-block-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9aa1ad;
  font-weight: 600;
  flex: 1;
}
.reporting-block-actions {
  display: flex;
  gap: 4px;
}
.reporting-block-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b8bcc8;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.reporting-block-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.reporting-block-btn.reporting-danger {
  background: rgba(248, 113, 113, 0.1) !important;
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.25) !important;
}

.reporting-block-body { padding: 0.75rem; }

/* ---- Block-specific inputs ---- */
.rep-heading-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.25rem 0;
}
.rep-heading-input:focus { outline: none; }
.rep-heading-input::placeholder { color: #6b7180; }

.rep-text-input {
  width: 100%;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.03);
  color: #d4d8e0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
}
.rep-text-input:focus { outline: 1px solid rgba(91, 127, 255, 0.4); border-color: rgba(91, 127, 255, 0.5); }

.reporting-doc-footer {
  margin-top: 1rem;
  text-align: center;
}
.reporting-add-block-inline {
  background: rgba(91, 127, 255, 0.08);
  color: #5b7fff;
  border: 1px dashed rgba(91, 127, 255, 0.4);
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.reporting-add-block-inline:hover {
  background: rgba(91, 127, 255, 0.15);
  border-color: rgba(91, 127, 255, 0.6);
}

/* ---- Modals (template picker + block catalog) ---- */
.reporting-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.reporting-modal-content {
  background: #1a1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
}
.reporting-modal-large { max-width: 720px; }

.reporting-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.reporting-modal-header h3 { margin: 0; font-size: 1rem; color: #fff; }
.reporting-modal-close {
  background: transparent;
  border: none;
  color: #b8bcc8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.reporting-modal-close:hover { color: #fff; }

.reporting-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  padding: 1rem;
}
.reporting-template-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.reporting-template-card:hover {
  background: rgba(91, 127, 255, 0.1);
  border-color: rgba(91, 127, 255, 0.4);
  transform: translateY(-2px);
}
.reporting-template-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.reporting-template-name { font-size: 0.9rem; color: #fff; font-weight: 600; }
.reporting-template-desc { font-size: 0.72rem; color: #9aa1ad; margin-top: 4px; }

.reporting-catalog {
  padding: 0.75rem 1rem 1rem;
}
.reporting-catalog-section { margin-bottom: 1rem; }
.reporting-catalog-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9aa1ad;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.reporting-catalog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.reporting-catalog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.7rem 0.4rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.78rem;
}
.reporting-catalog-card:hover {
  background: rgba(91, 127, 255, 0.1);
  border-color: rgba(91, 127, 255, 0.4);
}
.reporting-catalog-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 127, 255, 0.15);
  border-radius: 6px;
  font-weight: 700;
  color: #b9c5ff;
}

/* ---- Data-driven block: config strip + preview area ---- */
.rep-block-config {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.rep-config-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.7rem;
  color: #9aa1ad;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.rep-config-label.rep-config-flex { flex: 1 1 200px; }
.rep-config-label input[type="text"],
.rep-config-label input[type="number"],
.rep-config-label input[type="date"],
.rep-config-label select {
  background: rgba(255, 255, 255, 0.04);
  color: #d4d8e0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  min-width: 120px;
}
.rep-config-label input[type="file"] {
  color: #b8bcc8;
  font-size: 0.75rem;
}

.rep-block-preview { min-height: 40px; }
.rep-loading { color: #6b7280; font-size: 0.8rem; padding: 0.5rem 0; }
.rep-error { color: #f87171; font-size: 0.8rem; padding: 0.5rem 0; }
.rep-empty-hint { color: #6b7280; font-style: italic; font-size: 0.8rem; padding: 0.5rem 0; }

/* Source meta line shown on captured-image blocks. */
.rep-capture-meta {
  font-size: 0.7rem;
  color: #9aa1ad;
  font-style: italic;
  align-self: center;
}
.rep-capture-meta strong { color: #d4d8e0; }

/* Hide the global FAB while the user is on the Reporting page itself
   (no need to capture from inside the report editor). */
.reporting-page ~ .capture-fab,
body:has(.reporting-page) .capture-fab { display: none; }

/* ---- Image block ---- */
.rep-image-figure { margin: 0; text-align: center; }
.rep-image-figure img {
  max-width: 100%;
  max-height: 420px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rep-image-figure figcaption {
  font-size: 0.75rem;
  color: #9aa1ad;
  margin-top: 0.4rem;
  font-style: italic;
}

/* ---- Player Champion Pool ---- */
.rep-champ-pool {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}
.rep-champ-cell {
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 0.4rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rep-champ-cell img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rep-champ-name {
  font-size: 0.7rem;
  color: #d4d8e0;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-champ-meta {
  font-size: 0.65rem;
  color: #9aa1ad;
  margin-top: 2px;
}
.rep-champ-meta .positive { color: #4ade80; }
.rep-champ-meta .neutral { color: #fbbf24; }
.rep-champ-meta .negative { color: #f87171; }

/* ---- Drafts Showcase ---- */
.rep-drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
}
.rep-draft-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.5rem;
}
.rep-draft-meta {
  font-size: 0.7rem;
  color: #9aa1ad;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}
.rep-draft-side {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.25rem;
}
.rep-draft-side.blue { border-left: 3px solid #60a5fa; padding-left: 0.4rem; }
.rep-draft-side.red { border-left: 3px solid #f87171; padding-left: 0.4rem; }
.rep-draft-bans, .rep-draft-picks {
  display: flex;
  gap: 3px;
}
.rep-draft-bans { opacity: 0.55; filter: grayscale(0.5); }
.rep-draft-champ {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rep-draft-empty {
  width: 24px;
  height: 24px;
  display: inline-block;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ============================================================
   PRESENTATION MODE (fullscreen)
   Triggered by the "Present" button -> requestFullscreen on #reportingDoc.
   Editor chrome is hidden, content scales up for on-screen viewing.
   Browser Esc handles exit.
   ============================================================ */
#reportingDoc:fullscreen,
#reportingDoc:-webkit-full-screen {
  background: #0a0c12;
  color: #e4e6eb;
  padding: 4vh 6vw;
  overflow-y: auto;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
}

/* Hide editor UI while presenting. */
#reportingDoc:fullscreen .reporting-doc-toolbar > *:not(.reporting-title-input),
#reportingDoc:fullscreen .reporting-doc-footer,
#reportingDoc:fullscreen .reporting-block-header,
#reportingDoc:fullscreen .rep-block-config {
  display: none !important;
}

/* Title centered + huge for the audience. */
#reportingDoc:fullscreen .reporting-doc-toolbar {
  border-bottom: 2px solid rgba(91, 127, 255, 0.5);
  padding-bottom: 2vh;
  margin-bottom: 4vh;
  display: block !important;
  text-align: center;
}
#reportingDoc:fullscreen .reporting-title-input {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 2.8rem !important;
  text-align: center !important;
  font-weight: 800 !important;
  width: 100% !important;
  pointer-events: none; /* read-only during presentation */
}

/* Bigger block spacing + clean borders. */
#reportingDoc:fullscreen .reporting-block {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-bottom: 3vh !important;
  page-break-inside: avoid;
}
#reportingDoc:fullscreen .reporting-block-body { padding: 1.5vh 2vw !important; }

/* Headings scaled up. */
#reportingDoc:fullscreen .rep-heading-input {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(91, 127, 255, 0.5) !important;
  color: #fff !important;
  font-size: 1.7rem !important;
  font-weight: 700;
  padding: 0 0 0.4vh 0;
  pointer-events: none;
}

/* Text / notes readable from across the room. */
#reportingDoc:fullscreen .rep-text-input {
  background: transparent !important;
  border: none !important;
  color: #d4d8e0 !important;
  font-size: 1.1rem !important;
  line-height: 1.55 !important;
  height: auto !important;
  min-height: 0 !important;
  resize: none !important;
  pointer-events: none;
  white-space: pre-wrap;
}

/* Captured images: max page-fit, centered. */
#reportingDoc:fullscreen .rep-image-figure img {
  max-width: 100%;
  max-height: 70vh;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}
#reportingDoc:fullscreen .rep-image-figure figcaption {
  font-size: 0.95rem;
  color: #b0b5bf;
  margin-top: 1vh;
}

/* SoloQ rows / drafts / champion pool. same dashboard look, just larger gaps. */
#reportingDoc:fullscreen .home-soloq-row { padding: 0.7vh 1vw; }
#reportingDoc:fullscreen .rep-drafts-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5vw; }
#reportingDoc:fullscreen .rep-champ-pool {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1vw;
}
#reportingDoc:fullscreen .rep-champ-cell img { width: 56px; height: 56px; }

/* ============================================================
   PRINT / PDF EXPORT. dark "design doc" look, not a generic
   white-paper print. Widgets keep their dashboard aesthetic;
   editor chrome (toolbar, drag handles, config strips) is hidden.
   ============================================================ */
@media print {
  /* A4 portrait with sensible margins. Browsers will respect this when
     "Save as PDF". */
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  /* Force colors to render (browsers skip backgrounds by default to save ink). */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide everything except the report doc + nothing else. */
  body * { visibility: hidden; }
  .reporting-doc, .reporting-doc * { visibility: visible; }

  html, body {
    background: #0a0c12 !important;
    color: #e4e6eb !important;
  }

  .reporting-doc {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    background: #0a0c12 !important;
    color: #e4e6eb !important;
    padding: 0 !important;
    border: none !important;
  }

  /* Hide editor UI but keep the title visible at the top. */
  .reporting-doc-toolbar {
    display: block !important;
    margin: 0 0 10mm 0 !important;
    padding: 0 0 6mm 0 !important;
    border-bottom: 2px solid rgba(91, 127, 255, 0.4) !important;
    background: transparent !important;
  }
  .reporting-save-status,
  .reporting-doc-actions { display: none !important; }
  .reporting-doc-footer,
  .reporting-block-header,
  .rep-block-config { display: none !important; }

  .reporting-title-input {
    visibility: visible !important;
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 22pt !important;
    font-weight: 800 !important;
    text-align: center !important;
    padding: 0 !important;
    letter-spacing: 0.4px;
  }

  /* Block layout */
  .reporting-blocks { display: block !important; }
  .reporting-block {
    background: transparent !important;
    border: none !important;
    margin: 0 0 8mm 0 !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
    overflow: visible !important;
  }
  .reporting-block-body { padding: 0 !important; }

  /* Heading block: bold + blue accent, sticks with content below. */
  .reporting-block:has(.rep-heading-input) {
    page-break-after: avoid;
    margin-top: 6mm !important;
  }
  .rep-heading-input {
    color: #fff !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(91, 127, 255, 0.5) !important;
    font-size: 15pt !important;
    font-weight: 700 !important;
    padding: 0 0 2mm 0 !important;
    width: 100% !important;
  }

  /* Text / note block: readable size, no border. */
  .rep-text-input {
    color: #d4d8e0 !important;
    background: transparent !important;
    border: none !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    resize: none !important;
    padding: 0 !important;
    font-family: inherit;
  }

  /* SoloQ Overview. keep dark cards but a touch more contrast. */
  .home-soloq-players {
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .home-soloq-row {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 4px !important;
    page-break-inside: avoid;
    padding: 0.4rem 0.6rem !important;
  }
  .home-soloq-name { color: #fff !important; font-weight: 600; }
  .home-soloq-kda, .home-soloq-weekly { color: #c4c8d0 !important; }
  .home-soloq-avatar-fallback {
    background: rgba(91, 127, 255, 0.25) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }
  .home-soloq-wr.high   { background: rgba(74, 222, 128, 0.2) !important; color: #4ade80 !important; }
  .home-soloq-wr.medium { background: rgba(251, 191, 36, 0.2) !important; color: #fbbf24 !important; }
  .home-soloq-wr.low    { background: rgba(248, 113, 113, 0.2) !important; color: #f87171 !important; }
  .home-scrim-dot.win  { background: #4ade80 !important; }
  .home-scrim-dot.loss { background: #f87171 !important; }
  .home-soloq-champ-icon { border-color: rgba(255, 255, 255, 0.1) !important; }
  .home-soloq-champ-badge {
    background: #0f1115 !important;
    color: #fff !important;
    border-color: rgba(91, 127, 255, 0.5) !important;
  }

  /* Player Champion Pool */
  .rep-champ-cell {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    page-break-inside: avoid;
  }
  .rep-champ-name { color: #fff !important; }
  .rep-champ-meta { color: #b0b5bf !important; }
  .rep-champ-meta .positive { color: #4ade80 !important; }
  .rep-champ-meta .neutral  { color: #fbbf24 !important; }
  .rep-champ-meta .negative { color: #f87171 !important; }

  /* Drafts Showcase */
  .rep-drafts-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4mm !important;
  }
  .rep-draft-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    page-break-inside: avoid;
  }
  .rep-draft-meta { color: #b0b5bf !important; }
  .rep-draft-side.blue { border-left-color: #5b7fff !important; }
  .rep-draft-side.red  { border-left-color: #f87171 !important; }

  /* Captured images: centered, framed, page-break-safe. */
  .rep-image-figure {
    text-align: center !important;
    page-break-inside: avoid;
    margin: 0 !important;
  }
  .rep-image-figure img {
    max-width: 100% !important;
    max-height: 230mm !important; /* fit within an A4 page */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
  }
  .rep-image-figure figcaption {
    color: #b0b5bf !important;
    font-size: 9pt !important;
    margin-top: 2mm !important;
  }

  /* Chart canvases keep their dimensions but render exact colors. */
  canvas { background: transparent !important; }

  /* Capture meta line above an image stays visible (small caption). */
  .rep-capture-meta {
    display: none !important; /* hide source-page hint in print, label is in figcaption */
  }

  /* Hide the global FAB and toasts. */
  .capture-fab, .capture-toast, .capture-overlay { display: none !important; }
}
