:root{--cr80-width:53.98mm;--cr80-height:85.60mm}

/* Exact-size CR80 screen preview. */
.permit-portrait-stage{align-items:flex-start;gap:28px;padding:34px}
.permit-portrait-wrap{width:var(--cr80-width)}
.permit-card-v2{width:var(--cr80-width);height:var(--cr80-height);border-radius:3.18mm}
.permit-side-label{margin-bottom:10px}
.cr80-preview-meta{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 14px;color:#66717c;font-size:10px}
.cr80-preview-meta span{padding:6px 9px;border:1px solid #dfe3e8;border-radius:18px;background:#fff}

/* Landscape front artwork. */
.v2-yellow-head{height:17mm}
.v2-black-swoop{left:-5mm;right:-5mm;top:14mm;height:10mm;transform:rotate(-3deg)}
.v2-black-swoop:after{bottom:-1.7mm;height:1.1mm}
.v2-authority{left:2.2mm;right:2.2mm;top:1.5mm;grid-template-columns:10mm minmax(0,1fr) 19mm;gap:1mm}
.v2-smz-logo{width:10mm;height:7mm}
.v2-zura-logo{width:19mm;height:7mm}
.v2-authority>div:nth-child(2) strong{font-size:1.15mm}
.v2-authority>div:nth-child(2) small{margin-top:.25mm;font-size:.9mm}
.v2-authority>div:nth-child(2) b{margin-top:.25mm;font-size:.9mm}
.v2-permit-title{top:9.3mm;padding:0 16mm;font-size:2.9mm;line-height:1.1;letter-spacing:.55mm}
.v2-photo-frame{left:4mm;top:17mm;width:24mm;height:24mm;border-width:1.2mm;transform:none}
.v2-photo-frame img{object-fit:cover;object-position:center 34%;background:#fff;filter:brightness(1.05) contrast(1.08) saturate(1.04);transform:scale(1.04)}
.v2-photo-missing i{font-size:8mm}
.v2-photo-missing small{font-size:1mm}
.v2-holder{left:30mm;right:18mm;top:19.5mm}
.v2-holder h1{min-height:0;margin-bottom:1.1mm;font-size:3.4mm}
.v2-holder h1.v2-name-medium{font-size:3.05mm}
.v2-holder h1.v2-name-small{font-size:2.7mm}
.v2-holder dl{grid-template-columns:11mm minmax(0,1fr);gap:.42mm 1mm;margin:0}
.v2-holder dt{font-size:1.5mm;line-height:1.18}
.v2-holder dd{font-size:1.62mm;line-height:1.18}
.v2-holder .v2-contact-value{font-size:1.48mm}
.v2-qr{left:auto;right:3.5mm;bottom:3.2mm;width:13.5mm;height:13.5mm;padding:.7mm;transform:none}
.permit-v2-front .v2-watermark-image{left:57%;top:62%;width:35mm;height:35mm}

/* Landscape back artwork. */
.permit-v2-back{padding:2.2mm 4mm}
.permit-v2-back .v2-watermark-image{top:58%;width:38mm;height:38mm}
.v2-back-zura img{width:29mm;height:6.8mm}
.permit-v2-back>h2{margin:.8mm 0 .65mm;font-size:2.25mm;line-height:1.15}
.permit-v2-back>h3{margin:0 0 .65mm;font-size:1.55mm;line-height:1.2}
.v2-return{margin-bottom:.8mm;font-size:1.48mm;line-height:1.25}
.v2-contact{gap:8mm;margin:0 8mm .7mm}
.v2-contact p{font-size:1.35mm;line-height:1.3}
.permit-v2-back ul{margin:0 7mm;padding-left:4mm;font-size:1.25mm;line-height:1.3}
.permit-v2-back li{margin-bottom:.4mm}
.v2-signature{bottom:6.2mm;width:27mm;padding:.5mm 1mm .4mm}
.v2-signature img{height:4.3mm;object-fit:contain}
.v2-signature span{height:3.7mm;font-size:1.15mm}
.v2-signature strong{margin-top:.35mm;font-size:1.45mm}
.v2-back-wave{left:-4mm;right:-4mm;bottom:-6mm;height:11mm;transform:rotate(2deg)}
.v2-back-wave:before{top:-1mm;height:.8mm}
.v2-back-wave strong{top:4.3mm;font-size:1.65mm;transform:rotate(-2deg)}

/* Calibration card. */
.cr80-test-stage{display:flex;justify-content:center;padding:34px;border:1px solid #e5e7eb;border-radius:16px;background:repeating-linear-gradient(45deg,#f2f3f5,#f2f3f5 10px,#f7f8fa 10px,#f7f8fa 20px)}
.cr80-test-wrap{width:var(--cr80-width)}
.cr80-test-card{position:relative;overflow:hidden;width:var(--cr80-width);height:var(--cr80-height);border:.25mm solid #111;border-radius:3.18mm;background:#fff;color:#111;box-shadow:0 14px 36px rgba(17,17,17,.2)}
.cr80-test-safe{position:absolute;inset:2mm;border:.2mm dashed #f5b700;border-radius:2mm}
.cr80-test-center:before,.cr80-test-center:after{content:"";position:absolute;background:rgba(220,38,38,.55)}
.cr80-test-center:before{left:50%;top:2mm;bottom:2mm;width:.15mm}
.cr80-test-center:after{left:2mm;right:2mm;top:50%;height:.15mm}
.cr80-test-content{position:absolute;z-index:2;inset:5mm;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.cr80-test-content img{width:30mm;height:8mm;object-fit:contain}
.cr80-test-content h1{margin:2mm 0 .8mm;font-size:4mm}
.cr80-test-content p{margin:.4mm 0;font-size:1.7mm}
.cr80-corner{position:absolute;width:4mm;height:4mm;border-color:#111;border-style:solid}
.cr80-corner.tl{left:2mm;top:2mm;border-width:.35mm 0 0 .35mm}.cr80-corner.tr{right:2mm;top:2mm;border-width:.35mm .35mm 0 0}.cr80-corner.bl{left:2mm;bottom:2mm;border-width:0 0 .35mm .35mm}.cr80-corner.br{right:2mm;bottom:2mm;border-width:0 .35mm .35mm 0}

@media print{
    @page{size:53.98mm 85.60mm;margin:0}
    html,body{width:53.98mm!important;min-width:53.98mm!important;margin:0!important;padding:0!important;background:#fff!important}
    body{overflow:visible!important}
    .app-sidebar,.app-header,.page-bar,.app-footer,.no-print,.sidebar-backdrop,.cr80-preview-meta{display:none!important}
    .app-main,.page-content{width:53.98mm!important;min-width:53.98mm!important;margin:0!important;padding:0!important}
    .permit-card-stage,.cr80-test-stage{display:block!important;width:53.98mm!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#fff!important}
    .permit-card-wrap,.cr80-test-wrap{width:53.98mm!important;height:85.60mm!important;margin:0!important;page-break-after:always;break-after:page}
    .permit-card-wrap:last-child,.cr80-test-wrap:last-child{page-break-after:auto;break-after:auto}
    .cr80-single-side .permit-card-wrap:nth-child(n+2){display:none!important}
    .permit-card-v2,.cr80-test-card{width:53.98mm!important;height:85.60mm!important;margin:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;overflow:hidden!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
    .v2-photo-frame img{object-fit:cover!important;object-position:center 34%!important;filter:brightness(1.05) contrast(1.08) saturate(1.04)!important;transform:scale(1.04)!important}
    .v2-signature img{object-fit:contain!important}
    .v2-qr img,.v2-qr canvas{image-rendering:auto;background:#fff!important}
}

/* Portrait CR80 artwork (53.98 × 85.60 mm). */
.permit-portrait-stage{gap:25px;padding:26px}.permit-portrait-wrap{width:var(--cr80-width)}.permit-card-v2{width:var(--cr80-width);height:var(--cr80-height);border-radius:3mm}
.v2-yellow-head{height:30mm}.v2-black-swoop{left:-8mm;right:-8mm;top:20mm;height:15mm;transform:rotate(-8deg)}.v2-black-swoop:after{bottom:-2.2mm;height:1.5mm}
.v2-authority{left:2mm;right:2mm;top:2mm;grid-template-columns:10mm minmax(0,1fr) 15mm;gap:.5mm}.v2-smz-logo{width:10mm;height:7.5mm}.v2-zura-logo{width:15mm;height:7mm}.v2-authority>div:nth-child(2){min-width:0}.v2-authority>div:nth-child(2) strong,.v2-authority>div:nth-child(2) small,.v2-authority>div:nth-child(2) b{line-height:1.18;letter-spacing:-.03mm;white-space:nowrap}.v2-authority>div:nth-child(2) strong{font-size:.98mm}.v2-authority>div:nth-child(2) small{margin-top:.45mm;font-size:.94mm}.v2-authority>div:nth-child(2) b{margin-top:.35mm;font-size:.86mm}
.v2-permit-title{top:11.8mm;padding:0 2mm;font-size:3mm;line-height:1.25;letter-spacing:.7mm}
.v2-photo-frame{left:50%;top:21mm;width:25mm;height:25mm;border-width:1.4mm;transform:translateX(-50%)}.v2-photo-frame img{object-fit:cover;object-position:center 34%;background:#fff;filter:brightness(1.05) contrast(1.08) saturate(1.04);transform:scale(1.04)}.v2-photo-missing i{font-size:10mm}.v2-photo-missing small{font-size:1.1mm}
.v2-holder{left:4mm;right:4mm;top:47mm;bottom:15mm;overflow:hidden}.v2-holder h1{min-height:4mm;margin-bottom:1.1mm;font-size:3.5mm}.v2-holder h1.v2-name-medium{font-size:3.05mm}.v2-holder h1.v2-name-small{font-size:2.65mm}.v2-holder dl{grid-template-columns:14mm minmax(0,1fr);gap:.5mm 1.2mm;margin:0 1mm}.v2-holder dt,.v2-holder dd,.v2-holder .v2-contact-value{font-size:1.8mm;line-height:1.25}.v2-holder dt{font-weight:500}.v2-holder dd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2-qr{left:50%;right:auto;bottom:1.5mm;width:12mm;height:12mm;padding:.6mm;transform:translateX(-50%)}.permit-v2-front .v2-watermark-image{left:50%;top:62%;width:43mm;height:43mm}
.permit-v2-back{padding:4mm 4.5mm}.permit-v2-back .v2-watermark-image{top:62%;width:43mm;height:43mm}.v2-back-zura img{width:34mm;height:8.5mm}.permit-v2-back>h2{margin:3mm 0 2mm;font-size:2.65mm;line-height:1.2}.permit-v2-back>h3{margin:0 0 2mm;font-size:2mm;line-height:1.3}.v2-return{margin:0 0 2mm;font-size:1.9mm;line-height:1.3}.v2-contact{gap:3mm;margin:0 0 1.5mm}.v2-contact p{font-size:1.7mm;line-height:1.35}.permit-v2-back ul{margin:0;padding-left:4.5mm;font-size:1.75mm;line-height:1.28}.permit-v2-back li{margin-bottom:.65mm}.v2-signature{bottom:12.2mm;width:38mm;padding:.7mm 1.5mm .7mm}.v2-signature img{width:34mm;height:10mm;object-fit:contain}.v2-signature span{height:8.6mm;font-size:1.5mm}.v2-signature strong{margin-top:.45mm;font-size:2mm}.v2-back-wave{left:-4mm;right:-4mm;bottom:-5mm;height:15mm;transform:rotate(4deg)}.v2-back-wave:before{top:-1.6mm;height:1.4mm}.v2-back-wave strong{top:5mm;font-size:2.2mm;transform:rotate(-4deg)}
