/* The foreground is the original paper texture, separated at its actual crease. */
.cue-definitions{position:absolute;pointer-events:none;overflow:hidden}
.invitation-art{position:absolute;left:var(--art-left);top:var(--art-top);width:var(--art-width);height:var(--art-height);pointer-events:none;visibility:hidden;perspective:1100px}
.entrance.is-cueing .invitation-art{visibility:visible}
.cue-envelope,.cue-face,.cue-cavity,.cue-light{position:absolute;inset:0;width:100%;height:100%}
.cue-envelope{transform-origin:49.941383% 45%;transform-style:preserve-3d;will-change:transform}
.cue-face{transform-origin:49.941383% 42.3%;backface-visibility:hidden;will-change:transform}
.cue-face img{display:block;width:100%;height:100%;user-select:none}
.cue-face-left{clip-path:polygon(49.941383% 24.94577%,50% 59.652928%,36.987104% 75.05423%)}
.cue-face-right{clip-path:polygon(49.941383% 24.94577%,63.130129% 75.05423%,50% 59.652928%)}
.cue-cavity,.cue-light{overflow:visible;pointer-events:none}
.cue-inner-light{opacity:0;filter:blur(3px)}
.cue-crease-glow,.cue-shimmer,.cue-sparks circle{opacity:0}
.cue-shimmer-halo,.cue-shimmer-core{stroke-dashoffset:14}
.entrance.is-paper-cue .door-solid img{mask-image:url('./assets/envelope-knockout.svg'),linear-gradient(to bottom,transparent,#000 8%,#000 92%,transparent),linear-gradient(to right,transparent,#000 5%,#000 95%,transparent);mask-size:100% 100%;mask-repeat:no-repeat;mask-composite:intersect}
.entrance.is-paper-cue .door-cutout img{mask-image:url('./assets/envelope-knockout.svg'),url('./assets/wings-silhouette.svg');mask-size:100% 100%;mask-repeat:no-repeat;mask-composite:intersect}
.entrance.is-cueing:not(.is-paper-cue) .cue-face,.entrance.is-cueing:not(.is-paper-cue) .cue-cavity{visibility:hidden}
/* Mask the child image first, then flex its parent. Applying both to the image
   clips the moving wing tips against the silhouette's resting position. */
.entrance.is-wing-breathing .wing-art{filter:url('#wing-breath')}
.entrance[data-cue="combined"] .envelope-button{touch-action:none;cursor:grab}
.entrance[data-cue="combined"].is-holding .envelope-button{cursor:grabbing}
.entrance.is-dragging .envelope-button .envelope-fill,.entrance.is-dragging .envelope-button .envelope-bloom,.entrance.is-dragging .envelope-button .envelope-edge{opacity:0}
.entrance[data-cue]:not([data-cue="none"]) .caption-action{visibility:hidden}
.entrance[data-cue]:not([data-cue="none"]) .caption-line{height:15px;opacity:.55}
.entrance[data-cue]:not([data-cue="none"]) .envelope-button:hover .envelope-fill{opacity:.065}
.entrance[data-cue]:not([data-cue="none"]) .envelope-button:hover .envelope-bloom{opacity:.3}
.entrance.is-preparing .envelope-button{pointer-events:none}
.entrance.is-preparing .intro-chrome,.entrance.is-preparing .intro-caption,.entrance.is-preparing .intro-footer{opacity:0;transition:opacity .18s ease}

/* Invitation cues stay visible; the existing reveal controls are tucked away. */
.intro-chrome{z-index:3}
.intro-tools{width:590px;max-width:calc(100% - 112px);gap:10px}
.cue-control-row{gap:10px}
.cue-picker{padding:4px;gap:2px}
.cue-picker button{font-size:10px;padding:9px 8px;min-height:34px}
.cue-picker button span{color:#606d88;font-size:7px;margin-right:3px}
.cue-picker button[aria-pressed="true"] span{color:#a6bce4}
.cue-details{padding-left:50px;width:100%;display:flex;align-items:center;justify-content:space-between;gap:13px;min-height:27px}
.cue-details p{margin:0;color:#828da4;font-size:9px;line-height:1.6;max-width:280px}
#preview-cue{flex-shrink:0;background:none;border:0;padding:8px 0;color:#b4c2dc;font-size:9px;cursor:pointer;pointer-events:auto}
#preview-cue span{display:inline-block;margin-left:4px;transition:transform .3s ease}
#preview-cue:hover span{transform:rotate(-55deg)}
#preview-cue:disabled{opacity:.3;cursor:default}
.opening-options{width:100%;padding-left:50px;pointer-events:auto}
.opening-options>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#7b879e;font-size:8px;letter-spacing:.35px;padding:6px 0}
.opening-options>summary::-webkit-details-marker{display:none}
.opening-options>summary span{font-size:13px;transition:transform .2s ease}
.opening-options[open]>summary span{transform:rotate(180deg)}
.opening-options-content{display:flex;flex-direction:column;gap:10px;padding:13px 12px 12px;border:1px solid #95acd022;border-radius:7px;background:#050710ed;box-shadow:0 12px 35px #0003}
.opening-options-content .picker-label{width:34px}
.opening-options-content .finish-details{padding-left:44px;gap:10px}
.opening-options-content .finish-details p{max-width:225px}
.entrance.is-opening .opening-options,.entrance.is-opening #preview-cue{pointer-events:none}

@media(min-width:601px) and (max-width:1000px){
  .cue-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
}
@media(max-width:600px){
  .intro-tools{width:100%;max-width:none;gap:8px}
  .cue-control-row{gap:8px}
  .cue-picker{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;width:100%}
  .cue-picker button{grid-column:span 2;min-height:44px;font-size:8px;padding:8px 4px}
  .cue-picker button span{font-size:6px;margin-right:2px}
  .cue-details{padding-left:44px;align-items:flex-start;min-height:29px;gap:9px}
  .cue-details p{font-size:8px;max-width:210px;line-height:1.5}
  #preview-cue{font-size:8px;padding:6px 0;min-height:44px;min-width:76px}
  .opening-options{padding-left:44px}
  .opening-options-content{margin-left:-44px;padding:12px 9px;background:#050710fa}
  .opening-options>summary{padding-top:2px;padding-bottom:7px;min-height:36px}
  .opening-options-content .picker-label{width:34px}
}
@media(max-width:360px){.cue-picker button{font-size:7px;padding-left:2px;padding-right:2px}.cue-picker button span{font-size:5.5px;margin-right:1px}.cue-details p{font-size:7.5px}}
@media(prefers-reduced-motion:reduce){.cue-envelope,.cue-face{will-change:auto}}
