/* Standard envelope preview, shared by every design. */
.device-simulation-note { text-align:center; font-size:10px; line-height:1.5; color:#9da2b0; margin:10px 0 0; position:relative; }
.stage { overflow:clip; padding:65px 0 60px; perspective:1400px; }
.device-model { width:min(284px,100%); aspect-ratio:.49; position:relative; margin:0 auto; perspective:1400px; isolation:isolate; }
.device-assembly { position:absolute; inset:0; transform-style:preserve-3d; }
.device-right { position:absolute; inset:0; border:6px solid #0a0b0e; border-radius:36px; background:#11141b; box-shadow:0 0 0 1px #757880,0 0 0 3px #2b2e35,0 18px 35px #0005; overflow:hidden; }
.device-right::before { content:""; position:absolute; height:11%; width:3px; right:-6px; top:23%; background:#82838b; }
.device-screen { position:relative; height:100%; padding:14% 6% 7%; color:#f8f4ec; background:linear-gradient(150deg,#1b1e2a,#0e131e); overflow:hidden; display:flex; flex-direction:column; container-type:inline-size; text-align:left; }
.device-screen::before { content:""; position:absolute; top:2.3%; left:35%; width:30%; height:3.7%; border-radius:20px; background:#050608; }
.device-status { position:absolute; top:3.2%; left:8%; right:8%; display:flex; justify-content:space-between; font-size:10px; line-height:1; font-weight:650; letter-spacing:.02em; color:#f8f4ec; }
.device-appbar { display:flex; align-items:center; gap:6%; font-size:8cqw; line-height:1; letter-spacing:-.06em; }
.device-appbar > span { display:grid; place-items:center; width:13%; aspect-ratio:1; background:#263247; border-radius:25%; font-size:7cqw; color:#f3b0a3; }
.device-appbar b { font-weight:700; }
.device-appbar small { margin-left:auto; font-size:3cqw; letter-spacing:.18em; color:#aeb3c0; }
.device-intro { font-size:3.1cqw; color:#eda09c; letter-spacing:.18em; font-weight:650; line-height:1.4; margin:9% 0 0; }
.device-intro small { display:block; color:#b7b9c4; font:5cqw Georgia,serif; letter-spacing:0; margin-top:4%; }
.device-screen .card-wrap, .device-screen .hero-demo-card { width:100%; aspect-ratio:.86; flex-shrink:0; border-radius:12px; margin:9% 0 0; box-shadow:0 14px 22px #0003; }
.device-screen .inside { padding:9%; border-radius:12px; justify-content:center; }
.device-screen .inside > :first-child, .device-screen .inside > :last-child { margin-top:0; margin-bottom:0; }
.device-screen .inside .mini { font-size:2.7cqw; line-height:1.4; letter-spacing:.14em; }
.device-screen .inside h3 { font-size:11cqw; margin:7% 0 6%; line-height:1.05; }
.device-screen .inside p { font-size:4.75cqw; line-height:1.55; }
.device-screen .signature { font-size:4.2cqw; margin-top:8%; }
.device-screen .inside::after { font-size:39cqw; bottom:3%; right:3%; }
.device-screen .letter-front { border-radius:12px; }
.device-screen .letter-front::before { width:38%; height:auto; aspect-ratio:1; top:62%; }
.device-screen .letter-front::after { top:62%; font-size:9cqw; }
.device-screen .cover-copy { top:20%; }
.device-screen .cover-copy strong { font-size:12cqw; line-height:1.08; }
.device-screen .cover-copy small { font-size:2.5cqw; line-height:1.5; margin-top:6%; }
.device-screen .front-footnote { font-size:2.3cqw; bottom:7%; letter-spacing:.13em; }
.device-screen .pull-tab { width:19%; height:15%; border-radius:1px 1px 13px 13px; font-size:7cqw; padding:2% 0; }
.device-screen .pull-tab::before { width:32%; height:1.5px; margin:0 auto 7%; }
.device-instruction { font:4.4cqw/1.4 Georgia,serif; color:#e6d9d0; text-align:center; margin:8% 0 0; }
.device-home { position:absolute; left:34%; right:34%; height:3px; bottom:2%; background:#fff9; border-radius:4px; }
.device-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.preview-bottom { align-items:center; }
.preview-bottom .secondary { white-space:normal; }
.hero-demo { width:min(284px,100%); }
.device-hero { width:100%; }
.device-screen .hero-demo-paper { padding:14% 9% 7%; display:flex; flex-direction:column; justify-content:center; }
.device-screen .hero-demo-paper small { font-size:2.8cqw; }
.device-screen .hero-demo-paper p { font:11cqw/1.1 Georgia,serif; margin:8% 0; }
.device-screen .hero-demo-paper div { font:4.8cqw/1.6 Georgia,serif; }
.device-screen .hero-demo-paper i { font:italic 4cqw Georgia,serif; margin-top:8%; }
.device-screen .hero-demo-front p { font:12cqw/1.1 Georgia,serif; margin:26% 5% 12%; }
.device-screen .hero-demo-front > span { font-size:17cqw; }
.device-screen .hero-demo-front small { font-size:2.5cqw; margin-top:20%; }
body.receiving .device-simulation-note { display:none; }
@media(max-width:600px) {
  .device-right { border-width:4px; border-radius:30px; box-shadow:0 0 0 1px #757880,0 0 0 2px #2b2e35,0 12px 20px #0005; }
  .preview-bottom { align-items:flex-start; }
  .device-actions { max-width:55%; }
}
.device-appbar > span img { display:block; width:100%; height:100%; object-fit:contain; }
.device-screen .inside::after, .device-screen .letter-front::after { content:""; width:10%; height:auto; aspect-ratio:1; background:currentColor; mask:url('/assets/sparkle.svg') center / contain no-repeat; }
.device-screen .inside::after { width:40%; color:#9e7890; }
.device-screen .letter-front::after { color:#f0d5ab; }
.hero-demo-front > span { display:block; width:24%; aspect-ratio:1; background:currentColor; mask:url('/assets/sparkle.svg') center / contain no-repeat; font-size:0; margin:auto; }
.preview-bottom { margin:16px 0 0; }
.preview-bottom .hint { min-height:32px; }
#open-card { min-width:134px; }

/* Optional native fold simulation. It never selects a letter effect or detects hardware. */
.device-wing, .device-hinge { display:none; }
.device-wing-face { position:absolute; inset:0; border:6px solid #0a0b0e; border-radius:36px; background:#11141b; overflow:hidden; }
.device-letter-label { font-size:2.9cqw; color:#a8adbc; letter-spacing:.16em; margin:7% 0 5%; }
.device-model[data-kind=folding] { --fold-radius:clamp(12px,3vw,28px); width:min(600px,100%); aspect-ratio:2853 / 2007; }
.device-model[data-kind=folding] .device-assembly { transform:translateX(var(--device-shift)); }
.device-model[data-kind=folding] .device-right { left:50%; border-radius:28px; }
.device-model[data-kind=folding] .device-screen::before { width:3.5%; height:1.8%; left:auto; right:6%; top:3%; }
.device-model[data-kind=folding] .device-status { font-size:clamp(5px,1.1vw,9px); }
.device-model[data-kind=folding] .device-wing { display:block; position:absolute; left:0; top:0; bottom:0; width:50%; transform-origin:right center; transform:rotateY(var(--hinge-angle)); transform-style:preserve-3d; cursor:ew-resize; touch-action:pan-y; user-select:none; }
.device-model[data-kind=folding] .device-wing-face { border-radius:28px; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.device-wing-outside { transform:rotateY(180deg); }
.device-wing-inside { transform:translateZ(.2px); }
.device-left-paper, .device-outer-letter { width:100%; aspect-ratio:.86; flex-shrink:0; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9%; overflow:hidden; }
.device-left-paper { background:linear-gradient(140deg,#fff3e6,#edd8d6,#d8d1ee); color:#9d6872; }
.device-left-paper > span { font:30cqw Georgia,serif; color:#bb98a5; }
.device-left-paper > i { font:italic 6cqw/1.5 Georgia,serif; text-align:center; }
.device-outer-letter { background:linear-gradient(145deg,#9a7194,#6d668d 55%,#555b7d); color:#fff1e7; }
.device-outer-letter strong { font:12cqw/1.1 Georgia,serif; text-align:center; padding:0 6%; max-width:100%; overflow-wrap:anywhere; }
.device-outer-letter > span { color:#f0d5ab; font:16cqw Georgia,serif; }
.device-outer-letter small { font-size:2.5cqw; letter-spacing:.13em; text-align:center; color:#f2d9c3; }
.device-model[data-kind=folding] .device-hinge { display:block; position:absolute; left:50%; width:14px; top:3%; bottom:3%; transform:translateX(-50%); pointer-events:none; background:linear-gradient(90deg,#05070b00,#05070b99 35%,#d8d9e529 50%,#05070b99 65%,#05070b00); opacity:var(--crease-opacity); }
.preview[data-mode=folding] .device-screen .card-wrap { border-top-left-radius:3px; border-bottom-left-radius:3px; }
.preview[data-mode=folding] .device-left-paper { border-top-right-radius:3px; border-bottom-right-radius:3px; }
/* Native layout: one wide inner screen, with a centred two-page letter. */
.device-appbar > span img { display:block; width:100%; height:100%; object-fit:contain; }
.device-model[data-kind=folding] .device-right { border-radius:0 var(--fold-radius) var(--fold-radius) 0; border-left-width:0; box-shadow:none; opacity:var(--inner-visibility,0); }
.device-model[data-kind=folding] .device-wing-face { border-radius:var(--fold-radius); }
.device-model[data-kind=folding] .device-wing-inside { border-radius:var(--fold-radius) 0 0 var(--fold-radius); border-right-width:0; box-shadow:none; }
.device-model[data-kind=folding] .device-screen { padding-top:4%; padding-bottom:4%; }
.device-model[data-kind=folding] .device-right .device-screen { padding-left:0; padding-right:18%; }
.device-model[data-kind=folding] .device-wing-inside .device-screen { padding-right:0; padding-left:18%; }
.device-model[data-kind=folding] .device-appbar { font-size:7cqw; height:10cqw; flex-shrink:0; }
.device-model[data-kind=folding] .device-wing-inside .device-appbar,
.device-model[data-kind=folding] .device-wing-inside .device-intro { margin-left:-18%; }
.device-model[data-kind=folding] .device-wing-inside .device-letter-label { margin-left:-22%; }
.device-model[data-kind=folding] .device-appbar > span { width:10cqw; height:10cqw; flex-shrink:0; }
.device-model[data-kind=folding] .device-intro { font-size:2.5cqw; line-height:1.3; margin-top:4%; }
.device-model[data-kind=folding] .device-intro small { font-size:3.3cqw; margin-top:2cqw; }
.device-model[data-kind=folding] .device-letter-label { font-size:2.2cqw; margin:4% 0 3%; }
.device-model[data-kind=folding] .device-right .device-appbar,
.device-model[data-kind=folding] .device-right .device-intro,
.device-model[data-kind=folding] .device-right .device-letter-label { visibility:hidden; }
.device-model[data-kind=folding] .device-right .device-status > :first-child,
.device-model[data-kind=folding] .device-wing-inside .device-status,
.device-model[data-kind=folding] .device-wing-inside .device-appbar small,
.device-model[data-kind=folding] .device-wing-inside .device-screen::before { visibility:hidden; }
.device-model[data-kind=folding] .device-right .card-wrap,
.device-model[data-kind=folding] .device-right .inside { border-top-left-radius:0; border-bottom-left-radius:0; }
.device-model[data-kind=folding] .device-left-paper { border-top-right-radius:0; border-bottom-right-radius:0; border-right:1px solid #9d687229; background:linear-gradient(140deg,#fff3e6,#f1e2e3); }
.device-model[data-kind=folding] .device-right .inside { background:linear-gradient(140deg,#f1e2e3,#e4d8ed); }
.device-model[data-kind=folding] .device-left-paper,
.device-model[data-kind=folding] .device-screen .card-wrap { aspect-ratio:.825; }
.device-model[data-kind=folding] .device-right .inside { text-align:center; align-items:center; padding:8%; }
.device-model[data-kind=folding] .device-right .inside .mini { font-size:2.1cqw; }
.device-model[data-kind=folding] .device-right .inside h3 { font-size:7.1cqw; margin:5% 0 6%; }
.device-model[data-kind=folding] .device-right .inside p { font-size:3.4cqw; line-height:1.45; }
.device-model[data-kind=folding] .device-right .inside::after { width:32%; }
.device-model[data-kind=folding] .device-right .signature { font-size:2.8cqw; margin-top:5%; }
.device-model[data-kind=folding] .device-left-paper > span { font-size:18cqw; }
.device-model[data-kind=folding] .device-left-paper > i { font-size:4cqw; line-height:1.45; }
.device-model[data-kind=folding] .device-right .device-home { left:0; right:68%; border-radius:0 4px 4px 0; }
.device-model[data-kind=folding] .device-wing-inside .device-home { left:68%; right:0; border-radius:4px 0 0 4px; }
.device-model[data-kind=folding] .device-hinge { width:6px; top:0; bottom:0; background:none; }
.device-hinge::before, .device-hinge::after { content:""; position:absolute; left:0; width:100%; height:4px; border-radius:2px; background:#343742; }
.device-hinge::before { top:0; }.device-hinge::after { bottom:0; }
.device-model[data-kind=folding] .device-right .device-instruction,
.device-model[data-kind=folding] .device-wing-inside .device-instruction { display:none; }
.device-left-paper > span, .device-outer-letter > span { display:block; width:24%; aspect-ratio:1; background:currentColor; mask:url('/assets/sparkle.svg') center/contain no-repeat; font-size:0; }
.device-outer-letter { position:relative; }.device-outer-letter > span { width:10%; }
.device-outer-letter::before { content:""; position:absolute; width:38%; aspect-ratio:1; border:1px solid var(--cover-foil); border-radius:50%; left:50%; top:65%; transform:translate(-50%,-50%); opacity:.4; }
/* The folded exterior has its own portrait layout, separate from the wide inner screen. */
.device-model[data-kind=folding] .device-wing-outside .device-screen { padding:14% 20% 4% 0; }
.device-model[data-kind=folding] .device-wing-outside .device-appbar,
.device-model[data-kind=folding] .device-wing-outside .device-intro,
.device-model[data-kind=folding] .device-wing-outside .device-letter-label { margin-left:4.4%; }
.device-model[data-kind=folding] .device-outer-letter { display:block; aspect-ratio:.825; border-top-left-radius:0; border-bottom-left-radius:0; }
.device-outer-letter .device-cover-sender { position:absolute; top:10%; left:4%; width:92%; }
.device-outer-letter strong { position:absolute; top:24%; left:5%; width:90%; padding:0; }
.device-outer-letter > span { position:absolute; top:65%; left:50%; transform:translate(-50%,-50%); }
.device-outer-letter > small:last-child { position:absolute; bottom:7%; left:4%; width:92%; }
@media(max-width:600px) { .device-model[data-kind=folding] .device-right,.device-model[data-kind=folding] .device-wing-face { border-width:4px; } }
