/* ==========================================================================
   Waxsealed — Seasonal & Holiday Envelope Skins
   Matches Waxsealed's 440x290 3D envelope geometry & CSS custom properties:
     --env-color, --env-lining, --seal-color, --env-ink, --paper-grain
   Themes: christmas | newyear | valentine | halloween
   ========================================================================== */

/* Shared 3D geometry wiring: display classic fold shadows & back pocket seams */
.envelope-3d[data-env-style="christmas"] .env-fold-shadows [data-for="classic"],
.envelope-3d[data-env-style="newyear"] .env-fold-shadows [data-for="classic"],
.envelope-3d[data-env-style="valentine"] .env-fold-shadows [data-for="classic"],
.envelope-3d[data-env-style="halloween"] .env-fold-shadows [data-for="classic"],
.envelope-3d[data-env-style="christmas"] .back-pocket-seams [data-for="classic"],
.envelope-3d[data-env-style="newyear"] .back-pocket-seams [data-for="classic"],
.envelope-3d[data-env-style="valentine"] .back-pocket-seams [data-for="classic"],
.envelope-3d[data-env-style="halloween"] .back-pocket-seams [data-for="classic"] {
  display: inline;
}

/* Optional badge pill for temporary seasonal tiles inside #envStyleTiles */
.format-tile.is-seasonal-skin {
  position: relative;
}

.seasonal-skin-badge {
  position: absolute;
  z-index: 3;
  top: 5px;
  right: 5px;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(20, 17, 26, 0.88);
  color: #f0d084;
  border: 1px solid rgba(240, 208, 132, 0.5);
  pointer-events: none;
  line-height: 1.35;
}

/* ==========================================================================
   1. CHRISTMAS / WINTER — "Winter Evergreen"
      Deep Alpine evergreen cotton paper with gold-foil pine boughs, holly
      sprigs, and winter stars.
   ========================================================================== */

.envelope-3d[data-env-style="christmas"] .env-front {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='290' viewBox='0 0 440 290'%3E%3Cg fill='none' stroke='%23e2c173' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg stroke-opacity='0.42' stroke-width='1.15'%3E%3Cpath d='M22 268 C48 242, 72 222, 102 204'/%3E%3Cpath d='M36 254 L26 240 M44 246 L36 230 M54 238 L46 222 M64 230 L58 214 M76 222 L70 207 M86 214 L82 200'/%3E%3Cpath d='M42 252 L58 258 M52 243 L68 248 M64 234 L80 238 M76 225 L92 228'/%3E%3Cpath d='M418 22 C394 46, 372 64, 344 80'/%3E%3Cpath d='M404 35 L414 49 M395 43 L403 58 M385 51 L393 66 M374 59 L381 73 M362 67 L368 80'/%3E%3Cpath d='M398 37 L382 32 M388 45 L372 41 M376 54 L360 51'/%3E%3C/g%3E%3Cg fill='%23c43a3e' fill-opacity='0.58' stroke='%23e2c173' stroke-opacity='0.5' stroke-width='0.6'%3E%3Ccircle cx='34' cy='258' r='2.5'/%3E%3Ccircle cx='40' cy='262' r='2.3'/%3E%3Ccircle cx='38' cy='254' r='2.1'/%3E%3Ccircle cx='404' cy='28' r='2.3'/%3E%3Ccircle cx='398' cy='24' r='2.1'/%3E%3C/g%3E%3Cg fill='%23f2d78c' fill-opacity='0.48' stroke='none'%3E%3Cpath d='M54 38 l1.4 4.2 4.2 1.4-4.2 1.4-1.4 4.2-1.4-4.2-4.2-1.4 4.2-1.4z'/%3E%3Cpath d='M396 244 l1.6 4.8 4.8 1.6-4.8 1.6-1.6 4.8-1.6-4.8-4.8-1.6 4.8-1.6z'/%3E%3Ccircle cx='212' cy='32' r='1.3'/%3E%3Ccircle cx='336' cy='254' r='1.2'/%3E%3Ccircle cx='126' cy='252' r='1.1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 74% 68% at 44% 38%, rgba(232, 198, 112, 0.14), rgba(14, 38, 29, 0) 68%),
    radial-gradient(circle at 50% 50%, rgba(255, 248, 224, 0.06), rgba(4, 14, 10, 0.42));
  background-size: 128px 128px, 440px 290px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 40px rgba(4, 14, 10, 0.56);
}

.envelope-3d[data-env-style="christmas"] .env-front:after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(226, 193, 115, 0.46);
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(226, 193, 115, 0.24);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='404' height='254' viewBox='0 0 404 254'%3E%3Cg fill='none' stroke='%23e2c173' stroke-opacity='0.58' stroke-width='1.1'%3E%3Cpath d='M8 26 V8 H26 M12 12 L20 20'/%3E%3Cpath d='M396 26 V8 H378 M392 12 L384 20'/%3E%3Cpath d='M8 228 V246 H26 M12 242 L20 234'/%3E%3Cpath d='M396 228 V246 H378 M392 242 L384 234'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.envelope-3d[data-env-style="christmas"] .env-inner-lining-wall {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23fff6dc' stroke-opacity='0.34' stroke-width='0.9' stroke-linecap='round'%3E%3Cpath d='M28 14 V42 M14 28 H42 M18 18 L38 38 M38 18 L18 38'/%3E%3Ccircle cx='28' cy='28' r='2.2' fill='%23fff6dc' fill-opacity='0.28'/%3E%3Ccircle cx='8' cy='8' r='1' fill='%23fff6dc' fill-opacity='0.3' stroke='none'/%3E%3Ccircle cx='48' cy='48' r='1' fill='%23fff6dc' fill-opacity='0.3' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 246, 214, 0.2), rgba(24, 16, 4, 0.36));
  background-size: 56px 56px, 100% 100%;
}

.envelope-3d[data-env-style="christmas"] .top-flap-outer {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='162' viewBox='0 0 440 162'%3E%3Cg fill='none' stroke='%23e2c173' stroke-linecap='round'%3E%3Cg stroke-opacity='0.48' stroke-width='1.15'%3E%3Cpath d='M116 18 C154 46, 184 74, 212 114'/%3E%3Cpath d='M324 18 C286 46, 256 74, 228 114'/%3E%3Cpath d='M140 36 L132 23 M156 49 L150 35 M172 64 L168 50 M188 81 L186 67'/%3E%3Cpath d='M144 40 L160 44 M160 54 L176 58 M176 70 L191 74'/%3E%3Cpath d='M300 36 L308 23 M284 49 L290 35 M268 64 L272 50 M252 81 L254 67'/%3E%3Cpath d='M296 40 L280 44 M280 54 L264 58 M264 70 L249 74'/%3E%3C/g%3E%3Cpath d='M220 24 l2 5.8 5.8 2-5.8 2-2 5.8-2-5.8-5.8-2 5.8-2z' fill='%23f2d78c' fill-opacity='0.64' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 248, 224, 0.14), rgba(4, 14, 10, 0.34));
  background-size: 128px 128px, 440px 162px, 100% 100%;
}

.envelope-3d[data-env-style="christmas"] .top-flap-inner {
  background-image:
    linear-gradient(124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.18) 5.5px, rgba(0, 0, 0, 0.18) 6.6px, transparent 6.6px),
    linear-gradient(-124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.18) 5.5px, rgba(0, 0, 0, 0.18) 6.6px, transparent 6.6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23fff6dc' stroke-opacity='0.38' stroke-width='0.95' stroke-linecap='round'%3E%3Cpath d='M28 14 V42 M14 28 H42 M18 18 L38 38 M38 18 L18 38'/%3E%3Ccircle cx='28' cy='28' r='2.2' fill='%23fff6dc' fill-opacity='0.3'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to top, rgba(255, 246, 214, 0.22), rgba(24, 16, 4, 0.32));
  background-size: 100% 100%, 100% 100%, 56px 56px, 100% 100%;
}

.format-thumb[data-thumb="env-christmas"] {
  background:
    radial-gradient(circle at 50% 60%, #9e1c24 0 5.5px, transparent 6px),
    radial-gradient(circle at 24% 30%, #f0d084 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 76% 72%, #f0d084 0 1.3px, transparent 1.7px),
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(226, 193, 115, 0.48) 50%, transparent calc(50% + 0.6px)) 0 0 / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgba(226, 193, 115, 0.48) 50%, transparent calc(50% + 0.6px)) 100% 0 / 50% 62% no-repeat,
    linear-gradient(155deg, #1d4737, #102a20);
}

/* ==========================================================================
   2. NEW YEAR'S EVE — "Midnight Champagne"
      Obsidian midnight-ink paper with Art Deco champagne-gold starbursts,
      stepped geometric corners, and effervescent gold dots.
   ========================================================================== */

.envelope-3d[data-env-style="newyear"] .env-front {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='290' viewBox='0 0 440 290'%3E%3Cg fill='none' stroke='%23ebd083' stroke-linecap='round'%3E%3Cg stroke-opacity='0.44' stroke-width='0.95'%3E%3Cpath d='M52 242 V218 M52 242 V266 M52 242 H28 M52 242 H76 M52 242 L35 225 M52 242 L69 259 M52 242 L69 225 M52 242 L35 259'/%3E%3Cpath d='M388 48 V28 M388 48 V68 M388 48 H368 M388 48 H408 M388 48 L374 34 M388 48 L402 62 M388 48 L402 34 M388 48 L374 62'/%3E%3Cpath d='M396 244 V230 M396 244 V258 M396 244 H382 M396 244 H410'/%3E%3C/g%3E%3Cg fill='%23f6e2a4' stroke='none'%3E%3Ccircle cx='52' cy='242' r='2.4' fill-opacity='0.72'/%3E%3Ccircle cx='388' cy='48' r='2.1' fill-opacity='0.68'/%3E%3Ccircle cx='96' cy='256' r='1.3' fill-opacity='0.5'/%3E%3Ccircle cx='122' cy='242' r='1.1' fill-opacity='0.42'/%3E%3Ccircle cx='348' cy='252' r='1.4' fill-opacity='0.48'/%3E%3Ccircle cx='216' cy='34' r='1.2' fill-opacity='0.48'/%3E%3Cpath d='M84 44 l1.5 4.5 4.5 1.5-4.5 1.5-1.5 4.5-1.5-4.5-4.5-1.5 4.5-1.5z' fill-opacity='0.52'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 70% 66% at 48% 36%, rgba(235, 208, 131, 0.14), rgba(14, 18, 38, 0) 68%),
    radial-gradient(circle at 50% 50%, rgba(255, 250, 232, 0.05), rgba(4, 6, 18, 0.52));
  background-size: 128px 128px, 440px 290px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 42px rgba(4, 6, 18, 0.62);
}

.envelope-3d[data-env-style="newyear"] .env-front:after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(235, 208, 131, 0.44);
  border-radius: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='404' height='254' viewBox='0 0 404 254'%3E%3Cg fill='none' stroke='%23ebd083' stroke-opacity='0.6' stroke-width='1.1'%3E%3Cpath d='M6 28 V14 H14 V6 H28'/%3E%3Cpath d='M398 28 V14 H390 V6 H376'/%3E%3Cpath d='M6 226 V240 H14 V248 H28'/%3E%3Cpath d='M398 226 V240 H390 V248 H376'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.envelope-3d[data-env-style="newyear"] .env-inner-lining-wall {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='%23fff8e0' stroke-opacity='0.34' stroke-width='0.9'%3E%3Cpath d='M0 52 Q26 26 52 52 M8 52 Q26 34 44 52 M16 52 Q26 42 36 52'/%3E%3Cpath d='M26 26 V52 M26 26 L12 40 M26 26 L40 40'/%3E%3Cpath d='M26 8 l1.3 3.7 3.7 1.3-3.7 1.3-1.3 3.7-1.3-3.7-3.7-1.3 3.7-1.3z' fill='%23fff8e0' fill-opacity='0.32' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 248, 224, 0.22), rgba(20, 14, 4, 0.36));
  background-size: 52px 52px, 100% 100%;
}

.envelope-3d[data-env-style="newyear"] .top-flap-outer {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='162' viewBox='0 0 440 162'%3E%3Cg fill='none' stroke='%23ebd083' stroke-linecap='round'%3E%3Cg stroke-opacity='0.48' stroke-width='1'%3E%3Cpath d='M220 44 V14 M220 44 V74 M220 44 H186 M220 44 H254 M220 44 L196 20 M220 44 L244 68 M220 44 L244 20 M220 44 L196 68'/%3E%3Cpath d='M138 24 L220 108 L302 24' stroke-opacity='0.28'/%3E%3C/g%3E%3Cg fill='%23f6e2a4' stroke='none'%3E%3Ccircle cx='220' cy='44' r='2.8' fill-opacity='0.78'/%3E%3Ccircle cx='162' cy='38' r='1.4' fill-opacity='0.55'/%3E%3Ccircle cx='278' cy='38' r='1.4' fill-opacity='0.55'/%3E%3Ccircle cx='186' cy='78' r='1.2' fill-opacity='0.48'/%3E%3Ccircle cx='254' cy='78' r='1.2' fill-opacity='0.48'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 248, 224, 0.13), rgba(4, 6, 18, 0.42));
  background-size: 128px 128px, 440px 162px, 100% 100%;
}

.envelope-3d[data-env-style="newyear"] .top-flap-inner {
  background-image:
    linear-gradient(124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.2) 5.5px, rgba(0, 0, 0, 0.2) 6.6px, transparent 6.6px),
    linear-gradient(-124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.2) 5.5px, rgba(0, 0, 0, 0.2) 6.6px, transparent 6.6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='%23fff8e0' stroke-opacity='0.36' stroke-width='0.9'%3E%3Cpath d='M0 52 Q26 26 52 52 M10 52 Q26 36 42 52'/%3E%3Cpath d='M26 26 V52 M26 26 L13 39 M26 26 L39 39'/%3E%3Cpath d='M26 8 l1.3 3.7 3.7 1.3-3.7 1.3-1.3 3.7-1.3-3.7-3.7-1.3 3.7-1.3z' fill='%23fff8e0' fill-opacity='0.34' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to top, rgba(255, 248, 224, 0.22), rgba(20, 14, 4, 0.34));
  background-size: 100% 100%, 100% 100%, 52px 52px, 100% 100%;
}

.format-thumb[data-thumb="env-newyear"] {
  background:
    radial-gradient(circle at 50% 60%, #c99c3e 0 5.5px, transparent 6px),
    radial-gradient(circle at 24% 26%, #f6e2a4 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 76% 24%, #f6e2a4 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 26% 74%, #f6e2a4 0 1.1px, transparent 1.5px),
    radial-gradient(circle at 74% 72%, #f6e2a4 0 1.4px, transparent 1.8px),
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(235, 208, 131, 0.5) 50%, transparent calc(50% + 0.6px)) 0 0 / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgba(235, 208, 131, 0.5) 50%, transparent calc(50% + 0.6px)) 100% 0 / 50% 62% no-repeat,
    linear-gradient(155deg, #1b2242, #0c1020);
}

/* ==========================================================================
   3. VALENTINE'S DAY — "Antique Rose Lace"
      Blush cotton paper with blind-embossed scalloped lace border, engraved
      botanical rose stems, and crushed crimson silk lining.
   ========================================================================== */

.envelope-3d[data-env-style="valentine"] .env-front {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='290' viewBox='0 0 440 290'%3E%3Cg fill='none' stroke='%238f293b' stroke-opacity='0.24' stroke-width='1.15' stroke-linecap='round'%3E%3Cpath d='M24 266 C48 242, 66 218, 90 202'/%3E%3Cpath d='M48 242 C38 232, 40 220, 52 218 C56 228, 54 236, 48 242 Z' fill='%238f293b' fill-opacity='0.09'/%3E%3Cpath d='M64 226 C76 222, 84 228, 82 238 C72 238, 66 232, 64 226 Z' fill='%238f293b' fill-opacity='0.09'/%3E%3Ccircle cx='92' cy='199' r='5.5' fill='%23b54658' fill-opacity='0.14'/%3E%3Cpath d='M90 199 C91 196, 94 197, 93 200'/%3E%3Cpath d='M416 24 C392 48, 374 70, 350 86'/%3E%3Cpath d='M392 48 C402 58, 400 70, 388 72 C384 62, 386 54, 392 48 Z' fill='%238f293b' fill-opacity='0.09'/%3E%3Ccircle cx='348' cy='89' r='5' fill='%23b54658' fill-opacity='0.14'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 78% 74% at 46% 40%, rgba(255, 250, 250, 0.52), rgba(243, 227, 228, 0) 70%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), rgba(120, 48, 62, 0.14));
  background-size: 128px 128px, 440px 290px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 32px rgba(130, 52, 68, 0.18);
}

.envelope-3d[data-env-style="valentine"] .env-front:after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(166, 56, 76, 0.28);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.48),
    inset 0 0 0 4px rgba(166, 56, 76, 0.2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='406' height='256' viewBox='0 0 406 256'%3E%3Cg fill='none' stroke='%23a6384c' stroke-opacity='0.38' stroke-width='1.05'%3E%3Cpath d='M10 32 C10 14, 14 10, 32 10 M16 24 C18 17, 22 15, 28 15'/%3E%3Cpath d='M396 32 C396 14, 392 10, 374 10 M390 24 C388 17, 384 15, 378 15'/%3E%3Cpath d='M10 224 C10 242, 14 246, 32 246 M16 232 C18 239, 22 241, 28 241'/%3E%3Cpath d='M396 224 C396 242, 392 246, 374 246 M390 232 C388 239, 384 241, 378 241'/%3E%3Cpath d='M203 10 c-2.4-3-6.6-1.4-6.6 2 0 3.2 6.6 6.4 6.6 6.4 s6.6-3.2 6.6-6.4 c0-3.4-4.2-5-6.6-2 z' fill='%23a6384c' fill-opacity='0.22' stroke-width='0.9'/%3E%3Cpath d='M203 246 c-2.4-3-6.6-1.4-6.6 2 0 3.2 6.6 6.4 6.6 6.4 s6.6-3.2 6.6-6.4 c0-3.4-4.2-5-6.6-2 z' fill='%23a6384c' fill-opacity='0.22' stroke-width='0.9' transform='rotate(180 203 248)'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.envelope-3d[data-env-style="valentine"] .env-inner-lining-wall {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23f7d8dc' stroke-opacity='0.3' stroke-width='0.85'%3E%3Cpath d='M22 18 c-2.2-2.8-6-1.2-6 1.8 0 3 6 6.2 6 6.2 s6-3.2 6-6.2 c0-3-3.8-4.6-6-1.8 z' fill='%23f7d8dc' fill-opacity='0.14'/%3E%3Ccircle cx='4' cy='4' r='1' fill='%23f7d8dc' fill-opacity='0.28' stroke='none'/%3E%3Ccircle cx='40' cy='40' r='1' fill='%23f7d8dc' fill-opacity='0.28' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 224, 228, 0.16), rgba(32, 4, 12, 0.42));
  background-size: 44px 44px, 100% 100%;
}

.envelope-3d[data-env-style="valentine"] .top-flap-outer {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='162' viewBox='0 0 440 162'%3E%3Cg fill='none' stroke='%238f293b' stroke-opacity='0.28' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M124 18 C156 44, 186 72, 212 110'/%3E%3Cpath d='M316 18 C284 44, 254 72, 228 110'/%3E%3Cpath d='M160 48 C150 56, 154 66, 166 66 C168 58, 166 52, 160 48 Z' fill='%238f293b' fill-opacity='0.1'/%3E%3Cpath d='M280 48 C290 56, 286 66, 274 66 C272 58, 274 52, 280 48 Z' fill='%238f293b' fill-opacity='0.1'/%3E%3Cpath d='M220 34 c-3.2-4-8.8-1.8-8.8 2.6 0 4.4 8.8 8.8 8.8 8.8 s8.8-4.4 8.8-8.8 c0-4.4-5.6-6.6-8.8-2.6 z' fill='%23a6384c' fill-opacity='0.18'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 252, 252, 0.34), rgba(130, 52, 68, 0.14));
  background-size: 128px 128px, 440px 162px, 100% 100%;
}

.envelope-3d[data-env-style="valentine"] .top-flap-inner {
  background-image:
    linear-gradient(124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.14) 5.5px, rgba(0, 0, 0, 0.14) 6.6px, transparent 6.6px),
    linear-gradient(-124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.14) 5.5px, rgba(0, 0, 0, 0.14) 6.6px, transparent 6.6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23f7d8dc' stroke-opacity='0.34' stroke-width='0.9'%3E%3Cpath d='M22 18 c-2.2-2.8-6-1.2-6 1.8 0 3 6 6.2 6 6.2 s6-3.2 6-6.2 c0-3-3.8-4.6-6-1.8 z' fill='%23f7d8dc' fill-opacity='0.18'/%3E%3Ccircle cx='4' cy='4' r='1' fill='%23f7d8dc' fill-opacity='0.3' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to top, rgba(255, 224, 228, 0.18), rgba(32, 4, 12, 0.38));
  background-size: 100% 100%, 100% 100%, 44px 44px, 100% 100%;
}

.format-thumb[data-thumb="env-valentine"] {
  background:
    radial-gradient(circle at 50% 60%, #a61c34 0 5.5px, transparent 6px),
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(143, 41, 59, 0.3) 50%, transparent calc(50% + 0.6px)) 0 0 / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgba(143, 41, 59, 0.3) 50%, transparent calc(50% + 0.6px)) 100% 0 / 50% 62% no-repeat,
    linear-gradient(155deg, #f8ecec, #e6ced1);
}

/* ==========================================================================
   4. HALLOWEEN — "Candlelit Gothic"
      Charred espresso parchment with warm candlelight radial glow, antique
      copper Victorian gothic filigree, crescent moon, and subtle wax drips.
   ========================================================================== */

.envelope-3d[data-env-style="halloween"] .env-front {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='290' viewBox='0 0 440 290'%3E%3Cg fill='none' stroke='%23cc8e4d' stroke-linecap='round'%3E%3Cpath d='M52 222 A11 11 0 1 0 62 238 A8.5 8.5 0 1 1 52 222 Z' fill='%23cc8e4d' fill-opacity='0.34' stroke-opacity='0.52' stroke-width='0.9'/%3E%3Cg fill='%23e2a765' stroke='none' fill-opacity='0.44'%3E%3Cpath d='M390 236 l1.4 4.2 4.2 1.4-4.2 1.4-1.4 4.2-1.4-4.2-4.2-1.4 4.2-1.4z'/%3E%3Ccircle cx='78' cy='244' r='1.2'/%3E%3Ccircle cx='44' cy='252' r='1.1'/%3E%3Ccircle cx='216' cy='34' r='1.2'/%3E%3C/g%3E%3Cg fill='%236e1423' fill-opacity='0.45' stroke='none'%3E%3Cpath d='M138 16 c0 8 4 14 4 19 a3 3 0 0 1-6 0 c0-5 2-11 2-19 z'/%3E%3Cpath d='M150 16 c0 5 2.5 8 2.5 11 a2 2 0 0 1-4 0 c0-3 1.5-6 1.5-11 z'/%3E%3Cpath d='M306 16 c0 7 3.5 12 3.5 16 a2.6 2.6 0 0 1-5.2 0 c0-4 1.7-9 1.7-16 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 68% 64% at 46% 42%, rgba(214, 128, 56, 0.19), rgba(34, 27, 24, 0) 68%),
    radial-gradient(circle at 50% 50%, rgba(255, 220, 170, 0.04), rgba(8, 5, 4, 0.62));
  background-size: 128px 128px, 440px 290px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 46px rgba(8, 5, 4, 0.72);
}

.envelope-3d[data-env-style="halloween"] .env-front:after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(204, 142, 77, 0.42);
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(204, 142, 77, 0.2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='404' height='254' viewBox='0 0 404 254'%3E%3Cg fill='none' stroke='%23cc8e4d' stroke-opacity='0.54' stroke-width='1.15'%3E%3Cpath d='M6 34 C6 18, 18 6, 34 6 M10 24 Q16 16 24 10 M12 12 L22 22'/%3E%3Cpath d='M398 34 C398 18, 386 6, 370 6 M394 24 Q388 16 380 10 M392 12 L382 22'/%3E%3Cpath d='M6 220 C6 236, 18 248, 34 248 M10 230 Q16 238 24 244 M12 242 L22 232'/%3E%3Cpath d='M398 220 C398 236, 386 248, 370 248 M394 230 Q388 238 380 244 M392 242 L382 232'/%3E%3Cpath d='M188 8 Q202 18 216 8' stroke-opacity='0.44'/%3E%3Cpath d='M188 246 Q202 236 216 246' stroke-opacity='0.44'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.envelope-3d[data-env-style="halloween"] .env-inner-lining-wall {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23ffe3ba' stroke-opacity='0.28' stroke-width='0.9'%3E%3Cpath d='M24 4 L44 24 L24 44 L4 24 Z'/%3E%3Cpath d='M24 12 C28 18, 30 20, 36 24 C30 28, 28 30, 24 36 C20 30, 18 28, 12 24 C18 20, 20 18, 24 12 Z'/%3E%3Ccircle cx='24' cy='24' r='1.8' fill='%23ffe3ba' fill-opacity='0.26' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(255, 214, 156, 0.16), rgba(20, 8, 2, 0.48));
  background-size: 48px 48px, 100% 100%;
}

.envelope-3d[data-env-style="halloween"] .top-flap-outer {
  background-image:
    var(--paper-grain),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='162' viewBox='0 0 440 162'%3E%3Cg fill='none' stroke='%23cc8e4d' stroke-linecap='round'%3E%3Cpath d='M144 18 Q182 54 220 102 Q258 54 296 18' stroke-opacity='0.44' stroke-width='1.1'/%3E%3Cpath d='M166 18 Q194 48 220 84 Q246 48 274 18' stroke-opacity='0.28' stroke-width='0.9'/%3E%3Cpath d='M216 28 A11 11 0 1 0 227 44 A8.5 8.5 0 1 1 216 28 Z' fill='%23cc8e4d' fill-opacity='0.48' stroke-opacity='0.64' stroke-width='0.9'/%3E%3Ccircle cx='220' cy='62' r='1.8' fill='%23e2a765' fill-opacity='0.58' stroke='none'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgba(214, 128, 56, 0.14), rgba(8, 5, 4, 0.48));
  background-size: 128px 128px, 440px 162px, 100% 100%;
}

.envelope-3d[data-env-style="halloween"] .top-flap-inner {
  background-image:
    linear-gradient(124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.24) 5.5px, rgba(0, 0, 0, 0.24) 6.6px, transparent 6.6px),
    linear-gradient(-124.9deg, var(--env-color) 0px, var(--env-color) 5.5px, rgba(0, 0, 0, 0.24) 5.5px, rgba(0, 0, 0, 0.24) 6.6px, transparent 6.6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23ffe3ba' stroke-opacity='0.32' stroke-width='0.9'%3E%3Cpath d='M24 4 L44 24 L24 44 L4 24 Z'/%3E%3Cpath d='M24 12 C28 18, 30 20, 36 24 C30 28, 28 30, 24 36 C20 30, 18 28, 12 24 C18 20, 20 18, 24 12 Z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to top, rgba(255, 214, 156, 0.18), rgba(20, 8, 2, 0.44));
  background-size: 100% 100%, 100% 100%, 48px 48px, 100% 100%;
}

.format-thumb[data-thumb="env-halloween"] {
  background:
    radial-gradient(circle at 50% 60%, #6e1423 0 5.5px, transparent 6px),
    radial-gradient(circle at 50% 42%, rgba(214, 128, 56, 0.28), transparent 58%),
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(204, 142, 77, 0.48) 50%, transparent calc(50% + 0.6px)) 0 0 / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgba(204, 142, 77, 0.48) 50%, transparent calc(50% + 0.6px)) 100% 0 / 50% 62% no-repeat,
    linear-gradient(155deg, #2d231f, #140f0d);
}
