/* Receipt printer (app/javascript/receipt): the paper, the printer that feeds it, the action
   panel, and the print host. Panel controls use DaisyUI; everything here is scoped to .rp-*. */

.rp {
  --rp-ink: #1c1410;
  --rp-espresso: #3d2b1f;
  --rp-terracotta: #c9823a;
  --rp-clay: #e5ddd3;
  --rp-sand: #f5e6d3;
  --rp-cream: #faf7f2;
  --rp-taupe: #6b5c50;
  --rp-whatsapp: #1f7a4d;
  /* Terracotta darkened toward ink so small selected labels clear 4.5:1 on white. */
  --rp-terracotta-ink: #8a4f17;
  --rp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Mobile first: one column in task order (way back, receipt, print settings, sign-up), with
     sharing docked to the bottom of the screen. From 48rem: receipt and side panel side by side. */
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  color: var(--rp-ink);
}

.rp-stage,
.rp-side > :not(.rp-dock) {
  width: 100%;
  max-width: 21rem;
}

@media (min-width: 48rem) {
  .rp {
    grid-template-columns: minmax(0, 21rem) minmax(0, 19rem);
    justify-content: center;
    justify-items: stretch;
    gap: 3rem;
  }

  .rp-stage,
  .rp-side > :not(.rp-dock) {
    max-width: none;
  }
}

/* Touch first: 44px targets. Mouse users on wide screens keep DaisyUI's denser controls. */
.rp :is(.btn, .input),
.rp-form :is(.btn, .input, .select) {
  min-height: 2.75rem;
}

.rp .btn-square,
.rp-form .btn-square {
  min-width: 2.75rem;
}

/* iOS zooms into any field under 16px when it gets focus. */
.rp .input,
.rp-form :is(.input, .select) {
  font-size: 1rem;
}

@media (min-width: 48rem) and (pointer: fine) {
  .rp :is(.btn, .input),
  .rp-form :is(.btn, .input, .select) {
    min-height: 0;
  }

  .rp .btn-square,
  .rp-form .btn-square {
    min-width: 0;
  }

  .rp .input,
  .rp-form :is(.input, .select) {
    font-size: revert-layer;
  }
}

.rp-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.rp-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ── Printer and paper feed ─────────────────────────────────────────── */

/* --rp-backdrop is what shows through the paper's punch holes and torn edge; the shared image
   uses it as its frame so the holes still read as holes. */
.rp-stage {
  --rp-backdrop: var(--color-base-200, #f5e6d3);
  --rp-head: #1f1712;
  --rp-head-edge: #120d0a;

  display: grid;
  justify-items: center;
}

.rp-printer {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.875rem 0.875rem;
  border: 1px solid #000;
  border-radius: 1.5rem 1.5rem 1.25rem 1.25rem;
  color: #ede6dd;
  background: linear-gradient(180deg, #2a2019 0%, var(--rp-head) 45%, var(--rp-head-edge) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.07),
    0 1px 1px rgb(28 20 16 / 0.3),
    0 14px 28px -12px rgb(28 20 16 / 0.55);
}

.rp-printer__bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}

.rp-printer__badge {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: #d9d0c5;
  background: rgb(255 255 255 / 0.07);
}

.rp-printer__badge svg {
  width: 1rem;
  height: 1rem;
}

.rp-printer__model {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font: 700 0.875rem/1 ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-printer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 9999px;
  color: #cfc6bb;
  background: #0f0b08;
  font: 600 0.6875rem/1 ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rp-printer__led {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 9999px;
  background: var(--rp-terracotta);
  box-shadow: 0 0 0.5rem rgb(201 130 58 / 0.7);
  transition: background-color 200ms ease-out, box-shadow 200ms ease-out;
}

.rp-printer.is-printing .rp-printer__led {
  animation: rp-blink 0.7s steps(2, jump-none) infinite;
}

.rp-printer.is-done .rp-printer__led {
  background: #48c584;
  box-shadow: 0 0 0.5rem rgb(72 197 132 / 0.65);
}

/* The slit the paper comes out of. */
.rp-printer__slot {
  height: 0.6rem;
  border-radius: 9999px;
  background: #000;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.9), 0 1px 0 rgb(255 255 255 / 0.06);
}

.rp-printer.is-printing .rp-printer__bar {
  animation: rp-buzz 90ms linear infinite;
}

.rp-feed {
  position: relative;
  width: calc(100% - 2.25rem);
  margin-top: -1.1rem;
  /* Only the top edge hides the paper; the sides let its shadow through. */
  overflow-x: visible;
  overflow-y: clip;
}

/* The head's shadow falling on the paper as it leaves the slot. Outside the shot, so the
   shared image stays clean. */
.rp-feed__shade {
  position: absolute;
  inset: 0 0.75rem auto;
  z-index: 1;
  height: 2.75rem;
  background: linear-gradient(180deg, rgb(28 20 16 / 0.28), rgb(28 20 16 / 0));
  pointer-events: none;
}

/* Padding gives the shared image a frame; the frame colour is applied only to the image. */
.rp-shot {
  padding: 1.1rem 0.75rem 1.75rem;
}

.rp-shot.is-printing {
  animation: rp-feed 1.9s var(--rp-ease-out) both;
}

.rp-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-top: 0.25rem;
  padding: 0 1.125rem;
  border: 1px solid var(--rp-clay);
  border-radius: 9999px;
  color: var(--rp-ink);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: box-shadow 200ms ease-out, opacity 200ms ease-out;
}

.rp-replay:hover:not(:disabled) {
  box-shadow: 0 4px 12px -4px rgb(28 20 16 / 0.25);
}

.rp-replay:focus-visible {
  outline: 2px solid var(--rp-terracotta);
  outline-offset: 2px;
}

.rp-replay:disabled {
  opacity: 0.5;
  cursor: default;
}

.rp-replay .rp-icon svg {
  width: 1rem;
  height: 1rem;
}

.rp-stage__tip {
  max-width: 19rem;
  margin: 0.75rem 0 0;
  color: var(--rp-taupe);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

@keyframes rp-feed {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes rp-buzz {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(0.5px); }
}

@keyframes rp-blink {
  50% { opacity: 0.35; }
}

@keyframes rp-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .rp-printer.is-printing .rp-printer__bar,
  .rp-printer.is-printing .rp-printer__led {
    animation: none;
  }

  /* Still an animation, so the "printed" state (and the image) follows it. */
  .rp-shot.is-printing {
    animation: rp-fade 200ms ease-out both;
  }
}

/* ── Paper ──────────────────────────────────────────────────────────── */

.rp-paper {
  --rp-paper: #f8f7f4;
  --rp-paper-ink: #16120f;
  --rp-paper-muted: #5f5a53;
  --rp-paper-rule: #b9b3aa;
  --rp-paper-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rp-paper-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;

  position: relative;
  padding: 1.6em 1.45em 1.4em;
  color: var(--rp-paper-ink);
  background: var(--rp-paper);
  font: 0.8125rem/1.5 var(--rp-paper-mono);
  overflow-wrap: anywhere;
  /* drop-shadow, not box-shadow, so the shadow follows the torn edge. */
  filter: drop-shadow(0 1px 1px rgb(28 20 16 / 0.14)) drop-shadow(0 14px 16px rgb(28 20 16 / 0.16));
}

/* Torn edge: a row of teeth in the paper colour, each a 90° wedge pointing down. */
.rp-paper::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.65em;
  height: 0.65em;
  background: conic-gradient(from -45deg at 50% 100%, var(--rp-paper) 90deg, transparent 0) 0 0 / 1.3em 100% repeat-x;
}

/* Focused programmatically when a receipt is generated, so screen readers start on it. */
.rp-paper:focus {
  outline: none;
}

.rp-paper p,
.rp-paper dl,
.rp-paper dd,
.rp-paper ul {
  margin: 0;
}

/* Scoped under .rp-paper to outrank the margin reset on its p and dl. */
.rp-paper .rp-paper__rule {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px dashed var(--rp-paper-rule);
}

.rp-paper__head {
  display: grid;
  justify-items: center;
  gap: 0.25em;
  text-align: center;
}

.rp-paper__mark {
  display: grid;
  place-items: center;
  width: 3.1em;
  height: 3.1em;
  margin-bottom: 0.45em;
  border-radius: 9999px;
  color: var(--rp-paper-ink);
  background: #e8e5df;
}

.rp-paper__mark svg {
  width: 1.45em;
  height: 1.45em;
}

.rp-paper__issuer {
  font-size: 1.2em;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
}

.rp-paper__title {
  color: var(--rp-paper-muted);
  font: 0.95em/1.4 var(--rp-paper-sans);
}

/* The two holes of a perforated roll, cut through to the backdrop. */
.rp-paper__punched {
  position: relative;
}

.rp-paper__punch {
  position: absolute;
  top: 50%;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.5em;
  border-radius: 9999px;
  /* A shade darker than the backdrop, so the hole reads as depth on a light page. */
  background: color-mix(in oklab, var(--rp-backdrop, #f5e6d3) 78%, #3d2b1f);
  box-shadow: inset 0 1px 2px rgb(28 20 16 / 0.35);
  transform: translateY(-50%);
}

.rp-paper__punch--left { left: calc(-1.45em - 0.58em); }
.rp-paper__punch--right { right: calc(-1.45em - 0.58em); }

.rp-paper__pairs {
  display: grid;
  gap: 0.45em;
}

/* A value that does not fit beside its label drops to the line below, still right-aligned,
   instead of squeezing into a narrow column. */
.rp-paper__pairs div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1.25em;
}

.rp-paper__pairs dt,
.rp-paper__columns {
  flex-shrink: 0;
  color: var(--rp-paper-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-paper__pairs dd {
  min-width: 0;
  margin-left: auto !important;
  font-weight: 600;
  text-align: right;
  text-wrap: balance;
}

.rp-paper__columns {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75em !important;
  font-size: 0.88em;
}

.rp-paper__items {
  display: grid;
  gap: 0.8em;
  padding-left: 0;
  list-style: none;
}

.rp-paper__items div,
.rp-paper__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25em;
}

.rp-paper__items strong {
  min-width: 0;
  font-weight: 600;
}

/* Right-aligned inside their own box too: the shared image fixes each box's width, and its
   font can measure slightly narrower than the page's. */
.rp-paper__items span,
.rp-paper__total strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.rp-paper__columns span:last-child {
  text-align: right;
}

.rp-paper__items p {
  margin-top: 0.2em !important;
  color: var(--rp-paper-muted);
  font: italic 0.9em/1.4 var(--rp-paper-sans);
}

.rp-paper__total {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-paper__total strong {
  font-size: 1.45em;
  letter-spacing: 0;
}

.rp-paper__signature {
  margin-top: 2.6em;
  color: var(--rp-paper-muted);
  font: 0.9em/1.4 var(--rp-paper-sans);
  text-align: center;
}

.rp-paper__signature span {
  display: block;
  width: 78%;
  margin: 0 auto 0.4em;
  border-top: 1px solid var(--rp-paper-ink);
}

.rp-paper__thanks {
  font: 500 0.95em/1.4 var(--rp-paper-sans);
  text-align: center;
}

.rp-paper__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  margin-top: 0.6em;
  color: var(--rp-paper-muted);
  font: 0.78em/1.35 var(--rp-paper-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-paper__brand img {
  width: 2.2em;
  height: 2.2em;
}

.rp-paper__brand span {
  display: block;
}

.rp-paper__brand strong {
  color: var(--rp-paper-ink);
  font-weight: 700;
}

/* ── Action panel ──────────────────────────────────────────────────── */

/* One column: the side panel's children join the page grid, so the way back can come first
   and the dock can stick to the bottom of the whole receipt section. */
.rp-side {
  display: contents;
}

.rp-side__back {
  order: -1;
  margin-bottom: -1rem;
  margin-left: -0.75rem;
}

/* Sharing is what a phone is for: WhatsApp and the image stay within thumb reach while the
   receipt scrolls past, and the dock settles at the end of the section. */
.rp-dock {
  position: sticky;
  bottom: 0;
  z-index: 3;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin: -1rem -1rem 0;
  padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rp-clay);
  background: rgb(250 247 242 / 0.96);
  box-shadow: 0 -8px 24px -16px rgb(28 20 16 / 0.35);
}

.rp-dock .rp-panel__status {
  grid-column: 1 / -1;
}

.rp-dock .rp-panel__status:empty {
  margin-top: -0.5rem;
}

.rp-panel__share {
  display: none;
}

/* The site-wide analytics-preferences button sits where the dock's download button is; lift it
   above the dock on the pages that have one. */
body:has(.rp-dock) #analytics-preferences {
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

@media (min-width: 48rem) {
  body:has(.rp-dock) #analytics-preferences {
    bottom: revert-layer;
  }

  .rp-side {
    position: sticky;
    top: var(--rp-sticky-top, 1.5rem);
    display: grid;
    gap: 1rem;
  }

  .rp-side__back {
    order: 0;
    margin-bottom: 0;
  }

  .rp-dock {
    display: none;
  }

  .rp-panel__share {
    display: grid;
  }
}

.rp-panel {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--rp-clay);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.rp-sizes {
  display: grid;
  gap: 0.875rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rp-sizes__legend {
  margin: 0 0 0.4rem;
  color: var(--rp-taupe);
  font-size: 0.75rem;
  font-weight: 600;
}

.rp-sizes__options {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 0.375rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: var(--rp-cream);
  box-shadow: inset 0 0 0 1px var(--rp-clay);
}

.rp-size {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.5rem;
  color: var(--rp-taupe);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
}

.rp-size:hover {
  color: var(--rp-ink);
  background: var(--rp-sand);
}

.rp-size input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rp-size:has(input:checked) {
  color: var(--rp-terracotta-ink);
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--rp-terracotta), 0 1px 2px rgb(28 20 16 / 0.1);
}

.rp-size:has(input:focus-visible) {
  outline: 2px solid var(--rp-terracotta);
  outline-offset: 2px;
}

.rp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.rp-option .toggle:checked {
  --input-color: var(--rp-espresso);
}

.rp-calibrate {
  margin-top: -0.25rem;
  font-size: 0.8125rem;
  text-align: center;
}

.rp-calibrate summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  color: var(--rp-taupe);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.rp-calibrate summary:hover {
  color: var(--rp-ink);
}

.rp-calibrate summary::-webkit-details-marker {
  display: none;
}

.rp-calibrate__body {
  display: grid;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
  color: var(--rp-taupe);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
}

.rp-panel__share {
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rp-clay);
}

.rp-whatsapp {
  --btn-color: var(--rp-whatsapp);
  --btn-fg: #fff;
  border-color: var(--rp-whatsapp);
}

.rp-panel__status {
  margin: 0;
  color: var(--rp-taupe);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.rp-cta {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
  padding: 1.25rem;
  border-radius: 1rem;
  color: var(--rp-cream);
  background: var(--rp-espresso);
}

.rp-cta h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.rp-cta p {
  margin: 0 0 0.25rem;
  color: rgb(250 247 242 / 0.82);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Public generator form ─────────────────────────────────────────── */

/* Phones: an edge-to-edge sheet, so the only boxes inside the page are the services.
   From 40rem: a raised card. */
.rp-sheet {
  margin-inline: -1rem;
  background: var(--color-base-100, #faf7f2);
  border-block: 1px solid var(--color-base-300, #e5ddd3);
}

.rp-form {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 1rem;
}

@media (min-width: 40rem) {
  .rp-sheet {
    max-width: 48rem;
    margin-inline: auto;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgb(28 20 16 / 0.05), 0 8px 10px -6px rgb(28 20 16 / 0.05);
  }

  .rp-form {
    padding: 2rem;
  }
}

.rp-form__services {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rp-form__services ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-form__service {
  display: grid;
  gap: 0.375rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--color-base-200, #f5e6d3);
}

/* Money reads right-aligned in a narrow column; a full-width phone field keeps it at the start. */
@media (min-width: 40rem) {
  .rp-form__price {
    text-align: right;
  }
}

.rp-form [aria-invalid="true"] {
  border-color: var(--color-error, #9b3a2a);
}

.rp-form__error,
.rp-form__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rp-form__error {
  color: var(--color-error, #9b3a2a);
}

.rp-form__hint {
  color: var(--rp-taupe, #6b5c50);
}

/* Phones: the service name gets the whole first line; price and remove share the second.
   From 40rem they fit on one line. */
.rp-form__service-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
}

.rp-form__service-name {
  grid-column: 1 / -1;
}

@media (min-width: 40rem) {
  .rp-form__service-line {
    grid-template-columns: minmax(0, 1fr) 8rem auto;
  }

  .rp-form__service-name {
    grid-column: auto;
  }
}

.rp-form__services-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.rp-form__submit {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5ddd3;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #6b5c50;
}

@media (min-width: 40rem) {
  .rp-form__submit {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
  }
}

/* ── Printing ──────────────────────────────────────────────────────── */

.rp-print-host {
  display: none;
}

@media print {
  html.rp-printing,
  html.rp-printing body {
    background: #fff !important;
  }

  html.rp-printing body > :not(.rp-print-host) {
    display: none !important;
  }

  .rp-print-host {
    display: block;
    position: relative;
    left: var(--rp-print-offset, 0mm);
    width: var(--rp-print-width);
    margin: 0 auto;
    color: #000;
  }

  /* Printable width, not paper width: thermal heads print at most 384 dots (48mm) on 58mm rolls
     and 576 dots (72mm) on 80mm rolls, and print services place that area differently, so 58mm
     keeps a safety margin. The calibration fields override these per device. */
  .rp-print-host[data-paper="58"] { --rp-print-width: 44mm; font-size: 9pt; }
  .rp-print-host[data-paper="80"] { --rp-print-width: 72mm; font-size: 11pt; }
  .rp-print-host[data-paper="a4"] { --rp-print-width: 120mm; font-size: 13pt; }
  .rp-print-host[data-paper="a5"] { --rp-print-width: 100mm; font-size: 11pt; }
  .rp-print-host[data-paper="a6"] { --rp-print-width: 78mm; font-size: 9pt; }

  .rp-print-host[data-paper="58"],
  .rp-print-host[data-paper="80"] {
    padding: 3mm 0;
  }

  /* Thermal heads print grey as dither: everything goes black on white. */
  .rp-print-host .rp-paper {
    --rp-paper: #fff;
    --rp-paper-ink: #000;
    --rp-paper-muted: #000;
    --rp-paper-rule: #000;

    padding: 0;
    font-size: 1em;
    filter: none;
  }

  .rp-print-host .rp-paper__punch {
    display: none;
  }

  .rp-print-host .rp-paper__mark {
    background: none;
    box-shadow: inset 0 0 0 1px #000;
  }


  .rp-print-host[data-paper^="a"] .rp-paper {
    padding: 6mm;
    border: 1px solid #000;
  }

  .rp-print-host .rp-paper::after {
    display: none;
  }
}
