Skip to content

Commit d67feb8

Browse files
fix: make mobile certificate preview smaller with breathing room
Adjust mobile wrapper scaling and spacing so the certificate reads as a contained preview, and add a subtle mobile note about downloading full-size.
1 parent ee273c9 commit d67feb8

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/app/globals.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ a.subpage-inline-mail {
601601

602602
@media (max-width: 640px) {
603603
/* Scale only the fixed canvas visually; layout stays pixel-locked. */
604-
:root { --cert-ui-scale: clamp(0.26, calc((100vw - 72px) / 794), 0.40); }
604+
:root { --cert-ui-scale: clamp(0.28, calc((100vw - 108px) / 794), 0.36); }
605605
}
606606

607607
/* ── Mobile ── */
@@ -615,7 +615,7 @@ a.subpage-inline-mail {
615615
.certificate-scroll-zone {
616616
width: 100%;
617617
margin-left: 0;
618-
padding: 0 8px;
618+
padding: 8px 20px 0;
619619
box-sizing: border-box;
620620
overflow-x: hidden;
621621
}
@@ -625,6 +625,16 @@ a.subpage-inline-mail {
625625
margin: 0 auto !important;
626626
}
627627

628+
.cert-mobile-hint {
629+
display: block;
630+
margin: 0 0 14px;
631+
text-align: center;
632+
font-family: var(--font-dm), -apple-system, sans-serif;
633+
font-size: 11px;
634+
color: #7a7a7a;
635+
letter-spacing: 0.02em;
636+
}
637+
628638
/* Hero: keep CTA above the fold on small screens */
629639
.page-hero { padding-bottom: 10px; }
630640
.page-hero-emoji { margin-bottom: 8px; }
@@ -683,6 +693,10 @@ a.subpage-inline-mail {
683693

684694
}
685695

696+
.cert-mobile-hint {
697+
display: none;
698+
}
699+
686700
@media print {
687701
@page { size: A4 portrait; margin: 12mm; }
688702
body::before, body::after { display: none !important; }

src/components/CertificateCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ export default function CertificateCard({ cert, onReset }: Props) {
296296
/>
297297
</div>
298298
</div>
299+
<p className="cert-mobile-hint">Preview scaled for mobile. Download for full-size version.</p>
299300

300301
{/* Hidden fixed export source */}
301302
<div

0 commit comments

Comments
 (0)