/*
  High-fidelity wrapper for the Canva-exported pages.

  The generated Canva DOM intentionally uses absolute positioning to preserve the
  design. This file does not redraw the layout. It only adds a reusable page
  shell, proportional viewport fitting, and a few shared cleanup rules.
*/

:root {
  --faithful-page-bg: #ffffff;
  --faithful-ui-bg: #ffffff;
  --faithful-max-scale: 1;
  --faithful-page-scale: 1;
}

html[data-faithful="true"],
html[data-faithful="true"] body {
  margin: 0;
  min-height: 100%;
  background: var(--faithful-page-bg);
}

html[data-faithful="true"] body {
  overflow-x: hidden;
}

html[data-faithful="true"] section.rGeu6w {
  position: relative;
  width: 100%;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--faithful-section-bg, transparent);
}

html[data-faithful="true"] section.rGeu6w > div:first-child {
  flex: 0 0 auto;
  transform-origin: top center;
  will-change: transform;
}

html[data-faithful="true"] section.rGeu6w[data-fit-ready="true"] {
  flex: 0 0 var(--faithful-fit-height) !important;
  height: var(--faithful-fit-height) !important;
}

html[data-faithful="true"] section.rGeu6w[data-fit-ready="true"] > div:first-child {
  width: var(--faithful-design-width);
  height: var(--faithful-design-height);
  transform: scale(var(--faithful-scale));
}

html[data-faithful="true"] .footer-overflow-container,
html[data-faithful="true"] .modal-backdrop,
html[data-faithful="true"] .report-form-modal {
  display: none !important;
}

html[data-faithful="true"] .site-record-footer {
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(32px, calc(44px * var(--faithful-page-scale)), 44px);
  background: #000;
  color: rgba(255, 255, 255, .72);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(9px, calc(12px * var(--faithful-page-scale)), 12px);
  line-height: 1.6;
}

html[data-faithful="true"] .site-record-footer__inner {
  box-sizing: border-box;
  max-width: 1368px;
  margin: 0 auto;
  min-height: clamp(32px, calc(44px * var(--faithful-page-scale)), 44px);
  padding:
    clamp(7px, calc(10px * var(--faithful-page-scale)), 10px)
    clamp(12px, calc(24px * var(--faithful-page-scale)), 24px)
    calc(clamp(7px, calc(10px * var(--faithful-page-scale)), 10px) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, calc(16px * var(--faithful-page-scale)), 16px);
  flex-wrap: wrap;
  text-align: center;
}

html[data-faithful="true"] .site-record-footer a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}

html[data-faithful="true"] .site-record-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

html[data-faithful="true"] img {
  user-select: none;
}

@media print {
  html[data-faithful="true"] body {
    overflow: visible;
  }

  html[data-faithful="true"] section.rGeu6w {
    break-after: page;
  }
}
