diff --git a/resources/views/mails/preview.blade.php b/resources/views/mails/preview.blade.php
index b966354..3d43892 100644
--- a/resources/views/mails/preview.blade.php
+++ b/resources/views/mails/preview.blade.php
@@ -1,9 +1,9 @@
-
+
diff --git a/tests/MailRouteSecurityTest.php b/tests/MailRouteSecurityTest.php
index 649baed..f777f1c 100644
--- a/tests/MailRouteSecurityTest.php
+++ b/tests/MailRouteSecurityTest.php
@@ -162,3 +162,13 @@ function downloadUrl(Mail $mail, $attachment): string
->toContain('referrerpolicy="no-referrer"')
->not->toContain('src="');
});
+
+it('sizes the inline preview to its container rather than the viewport', function () {
+ $preview = view('mails::mails.preview', ['html' => '
Preview
'])->render();
+
+ // A viewport-wide frame inside a narrower card puts a centred email past
+ // the card's right edge, so the preview looks empty.
+ expect($preview)
+ ->toContain('width: 100%')
+ ->not->toContain('100vw');
+});