/* Keepsake bundle (core/opening/070) — INV-04 Keepsake Table · Luxe W0 (A1980; plan docs/plans/plan_inv04_keepsake_table_master.md).
   Stage 1, the still design (D-161). The invitation arrives on a table of handmade paper, seen from straight above:
   the couple's polaroid tucked behind an ivory envelope, a name card lying on its top, and the flap held shut by a wax
   seal with a sprig of dried fern tucked under it. The seal is the open control (D-026). Platinum rings (W1.3) and
   flowers lie on the table round it.
   W1.1 (A2000, the owner's remarks): photographs for everything that is a real object; the light comes from straight
   above the top of the screen (12 o'clock), so every shadow falls straight down, darkest at the contact and softening
   as it fades. A filter turns with its element (AG-T162), so nothing that carries a shadow is turned: the art inside it
   is. The bundle is larger on tablets and computers (on a computer the polaroid lies beside the envelope).
   W1.2 (A2016, the owner: the cord "looks super fake", "use a nice real seal"; the envelope looked skinny): the cord
   and its knot are gone; a photographed wax seal (Kie, recoloured: a shade layer multiplied and its sheen screened over
   --c-primary, chestnut by default) presses the flap's tip, the names read first at the top, the envelope is wider
   (.82, the hero's too), the rings are the engagement ring with its band, the flowers our own renders, and the papers
   and the table carry the soft relief of real handled cotton (hard-light grey maps).
   W1.3 (A2027, the owner: the ring "should be laying down", rings "cheap", the seal "a bit fake", the light as if
   "3–5 m away"): platinum rings lying flat, a hand-poured seal photographed and used as shot (picked from six), and
   the skin's distant-lamp shadows (crisp, offset by height, --op070-u grows with the screen), the table lit evenly.
   W1.4 (A2034, the owner: wording "like 'you are invited…'", no date in the opener): the name card reads "You are
   invited / to the {{event_type_label}} of / the names"; the date waits for the hero and the invitation card.
   The values match the skin's tokens, written out here because the opener must draw the same under any skin
   (opening-check renders it under garden and shahi too); the art is read by absolute path; every colour has a fallback.
   The open is a plain fade for now: the seal breaking and the bundle spreading are stage 2 (the animation wave). */
.op070 {
  --op070-ew: min(78vw, 440px, calc((100svh - 210px) * .82));
  --op070-eh: calc(var(--op070-ew) / .82);
  --op070-cx: 50%;
  --op070-cy: calc(50svh + 4svh);
  --op070-sw: max(104px, calc(var(--op070-ew) * .3));
  --op070-u: .8px;   /* W1.3: the skin's --k-u (shadow lengths grow with the objects on screen) */
  position: fixed; inset: 0; z-index: 100; overflow: hidden; touch-action: none; overscroll-behavior: contain;
  color: var(--k-ink, #2B2724);
  background: url("/skins/keepsake_table/assets/art/table-relief-1024.webp") 0 0 / 1280px 1280px repeat,
    url("/skins/keepsake_table/assets/art/table-768.webp") 0 0 / 384px 384px repeat, var(--k-paper, #F3F0EA);
  background-blend-mode: hard-light, multiply;
}
/* tablets upright: about 70 % of the width; the polaroid stands a fifth above the envelope */
@media (min-width: 700px) { .op070 { --op070-ew: min(72vw, 620px, calc((100svh - 190px) * .82 / 1.22)); --op070-cy: calc(50svh + var(--op070-eh) * .11); --op070-u: 1px; } }
@media (min-width: 1100px) { .op070 { --op070-u: 1.15px; } }
/* wide screens: the polaroid lies beside the envelope, so the envelope fills most of the screen's height */
@media (min-aspect-ratio: 1/1) { .op070 { --op070-ew: min(44vw, 640px, calc((100svh - 130px) * .82)); --op070-cx: calc(50% - var(--op070-ew) * .23); --op070-cy: calc(50svh - 18px); } }
.op070::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(140% 70% at 50% 0%, rgb(255 253 246 / .16), rgb(255 253 246 / 0) 62%),
    radial-gradient(150% 80% at 50% 100%, rgb(92 74 52 / .04), rgb(92 74 52 / 0) 62%); }

/* ---- flowers and rings on the table: the element carries the shadow, its ::before the (turned) picture ---- */
.op070 .op070__fl { position: absolute; display: block; pointer-events: none;
  filter: drop-shadow(0 var(--op070-u) calc(.6 * var(--op070-u)) rgb(30 22 14 / .40)) drop-shadow(0 calc(6 * var(--op070-u)) calc(1.8 * var(--op070-u)) rgb(30 22 14 / .32)) drop-shadow(0 calc(10 * var(--op070-u)) calc(12 * var(--op070-u)) rgb(30 22 14 / .08)); }   /* --k-sh-flower */
.op070 .op070__fl::before { content: ""; position: absolute; inset: 0; background: center / contain no-repeat; }
.op070 .op070__fl--tl { width: min(58vw, 420px); aspect-ratio: 628 / 640; left: max(-9vw, -80px); top: max(-5svh, -50px); }
.op070 .op070__fl--tl::before { background-image: url("/skins/keepsake_table/assets/art/spray-a-640.webp"); }
.op070 .op070__fl--br { display: none; width: min(40vw, 380px); aspect-ratio: 503 / 560; right: max(-7vw, -90px); bottom: max(-10svh, -100px); }
.op070 .op070__fl--br::before { background-image: url("/skins/keepsake_table/assets/art/spray-b-560.webp"); }
@media (min-width: 700px) { .op070 .op070__fl--br { display: block; } }
.op070 .op070__rings { position: absolute; display: block; width: clamp(84px, 24vw, 140px); aspect-ratio: 480 / 337; right: 6vw; bottom: 7svh;
  filter: drop-shadow(0 calc(.9 * var(--op070-u)) calc(.5 * var(--op070-u)) rgb(30 22 14 / .60)) drop-shadow(0 calc(4 * var(--op070-u)) calc(1.1 * var(--op070-u)) rgb(30 22 14 / .46)) drop-shadow(0 calc(7 * var(--op070-u)) calc(8 * var(--op070-u)) rgb(30 22 14 / .11)); }   /* --k-sh-prop */
.op070 .op070__rings::before { content: ""; position: absolute; inset: 0; rotate: -6deg;
  background: url("/skins/keepsake_table/assets/art/ring-pt-stack-480.webp") center / contain no-repeat; }
@media (min-width: 700px) {
  .op070 .op070__rings { right: auto; bottom: auto; width: calc(var(--op070-ew) * .24); left: calc(50% + var(--op070-ew) * .5 - 40px); top: calc(var(--op070-cy) + var(--op070-eh) * .14); }
  /* mirrored (a left-right mirror keeps the top light, AG-T284): the plain band tucks under the envelope's edge and the
     engagement ring's diamond lies out on the table */
  .op070 .op070__rings::before { rotate: 6deg; scale: -1 1; }
}

/* ---- the bundle: centred, a hair turned, like a parcel just set down ---- */
.op070 .op070__bundle { position: absolute; left: var(--op070-cx); top: var(--op070-cy); width: var(--op070-ew); height: var(--op070-eh);
  translate: -50% -50%; rotate: -2deg; }

/* the couple's polaroid, tucked behind the envelope, its corner showing */
.op070 .op070__pol { position: absolute; z-index: 0; width: 64%; right: -11%; top: -33%; rotate: 8deg; padding: 5.5% 5.5% 0; border-radius: 1.5px;
  background: url("/skins/keepsake_table/assets/art/wrinkle-b-768.webp") 50% 50% / cover no-repeat,
    url("/skins/keepsake_table/assets/art/card-384.webp") 0 0 / 160px 160px, var(--k-photo-white, #FCFBF8);
  background-blend-mode: hard-light, multiply;
  box-shadow: inset 0 .75px 0 rgb(255 255 255 / .75), inset 0 -.6px 0 rgb(52 40 28 / .10),
    0 0 0 calc(.5 * var(--op070-u)) rgb(30 22 14 / .16), 0 calc(.8 * var(--op070-u)) calc(.4 * var(--op070-u)) rgb(30 22 14 / .40), 0 calc(2 * var(--op070-u)) var(--op070-u) rgb(30 22 14 / .26), 0 calc(4 * var(--op070-u)) calc(7 * var(--op070-u)) calc(-2 * var(--op070-u)) rgb(30 22 14 / .08); }   /* --k-sh-card */
@media (min-width: 700px) { .op070 .op070__pol { top: -22%; } }
.op070 .op070__polimg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.04; object-fit: cover; object-position: var(--op070-pos, 50% 35%); background: #D9D3C8; }
.op070 .op070__polfoot { height: calc(var(--op070-ew) * .64 * .2); display: grid; place-items: center; font: 400 calc(var(--op070-ew) * .07)/1 var(--k-font-script, cursive); color: var(--k-ink-soft, #5E5750); }

/* the envelope, back up: cotton body, the closed flap a second layer of the same paper, two faint seams; each sheet
   carries its own handled relief (W1.2) */
.op070 .op070__env { position: absolute; inset: 0; z-index: 1; border-radius: 1.5px;
  background: url("/skins/keepsake_table/assets/art/wrinkle-a-768.webp") 50% 50% / cover no-repeat,
    url("/skins/keepsake_table/assets/art/card-384.webp") 0 0 / 192px 192px, var(--k-card, #FBF9F4);
  background-blend-mode: hard-light, multiply;
  box-shadow: inset 0 .75px 0 rgb(255 255 255 / .75),
    0 0 0 calc(.5 * var(--op070-u)) rgb(30 22 14 / .16), 0 var(--op070-u) calc(.5 * var(--op070-u)) rgb(30 22 14 / .50), 0 calc(4.2 * var(--op070-u)) calc(1.2 * var(--op070-u)) rgb(30 22 14 / .36), 0 calc(8 * var(--op070-u)) calc(10 * var(--op070-u)) calc(-3 * var(--op070-u)) rgb(30 22 14 / .09); }   /* --k-sh-thick: an envelope with a card in it */
.op070 .op070__flapw { position: absolute; inset: 0 0 auto; height: 62%; filter: drop-shadow(0 calc(.6 * var(--op070-u)) calc(.3 * var(--op070-u)) rgb(30 22 14 / .30)) drop-shadow(0 calc(1.4 * var(--op070-u)) calc(.5 * var(--op070-u)) rgb(30 22 14 / .12)); }   /* paper on paper: a hair of --k-sh-cut */
.op070 .op070__flap { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 52% 98%, 48% 98%);
  background: url("/skins/keepsake_table/assets/art/wrinkle-b-768.webp") 50% 50% / cover no-repeat,
    url("/skins/keepsake_table/assets/art/card-384.webp") 0 0 / 192px 192px, #F5F2EA;
  background-blend-mode: hard-light, multiply; }
.op070 .op070__seams { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the name card lying on the envelope's top, so the names read first and the seal second */
.op070 .op070__tagw { position: absolute; z-index: 4; left: 50%; top: 6%; width: 76%; translate: -50% 0; rotate: 3deg;
  filter: drop-shadow(0 calc(.8 * var(--op070-u)) calc(.4 * var(--op070-u)) rgb(30 22 14 / .46)) drop-shadow(0 calc(2.6 * var(--op070-u)) calc(.8 * var(--op070-u)) rgb(30 22 14 / .32)) drop-shadow(0 calc(5 * var(--op070-u)) calc(7 * var(--op070-u)) rgb(30 22 14 / .08)); }   /* --k-sh-cut */
.op070 .op070__tag { display: grid; justify-items: center; gap: .55em; padding: 8% 7% 8%;
  background: url("/skins/keepsake_table/assets/art/wrinkle-c-768.webp") 50% 50% / cover no-repeat,
    url("/skins/keepsake_table/assets/art/card-384.webp") 0 0 / 192px 192px, var(--k-card, #FBF9F4);
  background-blend-mode: hard-light, multiply;
  -webkit-mask: url("/skins/keepsake_table/assets/art/deckle-t.webp") 0 0 / 512px 14px repeat-x, url("/skins/keepsake_table/assets/art/deckle-b.webp") 0 100% / 512px 14px repeat-x,
    url("/skins/keepsake_table/assets/art/deckle-l.webp") 0 50% / 14px calc(100% - 26px) no-repeat, url("/skins/keepsake_table/assets/art/deckle-r.webp") 100% 50% / 14px calc(100% - 26px) no-repeat,
    linear-gradient(#000 0 0) 50% 50% / calc(100% - 24px) calc(100% - 24px) no-repeat;
  mask: url("/skins/keepsake_table/assets/art/deckle-t.webp") 0 0 / 512px 14px repeat-x, url("/skins/keepsake_table/assets/art/deckle-b.webp") 0 100% / 512px 14px repeat-x,
    url("/skins/keepsake_table/assets/art/deckle-l.webp") 0 50% / 14px calc(100% - 26px) no-repeat, url("/skins/keepsake_table/assets/art/deckle-r.webp") 100% 50% / 14px calc(100% - 26px) no-repeat,
    linear-gradient(#000 0 0) 50% 50% / calc(100% - 24px) calc(100% - 24px) no-repeat; }
.op070 .op070__names { margin: 0; text-align: center; line-height: 1.12; color: var(--c-primary-dark, #622F1B); white-space: nowrap;
  font: 400 min(calc(var(--op070-ew) * .148), calc(var(--op070-ew) * .62 / ((2 * var(--op070-len, 5) + 3) * .42)))/1.12 var(--k-font-script, cursive); }
.op070 .op070__amp { color: var(--c-secondary-dark, #8D6E37); }
/* W1.4 (A2034, the owner: "you are invited…", no date in the opener): the invitation line over the names */
.op070 .op070__inv { display: grid; justify-items: center; gap: .25em; margin: 0; color: var(--k-ink-soft, #5E5750); }
.op070 .op070__inv1 { font: 400 calc(var(--op070-ew) * .036)/1.2 var(--k-font-display, Georgia, serif); letter-spacing: .26em; text-transform: uppercase; }
.op070 .op070__inv2 { font: italic 500 calc(var(--op070-ew) * .05)/1.2 var(--k-font-body, Georgia, serif); }

/* printed ink (W1.1): a faint grain and a hair of letterpress on every word; the script sits in a padded span, because
   a mask ends at its element's box and Pinyon's swashes run past the line (AG-T285) */
.op070 .op070__ink { display: inline-block; padding: .3em .8em .5em; margin: -.3em -.8em -.5em; }
.op070 .op070__ink, .op070 .op070__inv, .op070 .op070-tap__t {
  -webkit-mask: url("/skins/keepsake_table/assets/art/ink-grain-192.webp") 0 0 / 192px 192px repeat; mask: url("/skins/keepsake_table/assets/art/ink-grain-192.webp") 0 0 / 192px 192px repeat;
  text-shadow: 0 .5px 0 rgb(255 253 248 / .55), 0 -.4px 0 rgb(43 39 36 / .10); }

/* ---- the sprig of dried fern tucked under the seal: its stem end under the wax, the frond reaching up and right ---- */
.op070 .op070__sprig { position: absolute; z-index: 4; display: block; pointer-events: none; width: calc(var(--op070-sw) * 1.5); aspect-ratio: 360 / 208;
  left: calc(50% - var(--op070-sw) * .1); top: calc(var(--op070-eh) * .6 - var(--op070-sw) * 1.5 * 208 / 360 * .5);
  filter: drop-shadow(0 calc(.8 * var(--op070-u)) calc(.4 * var(--op070-u)) rgb(30 22 14 / .32)) drop-shadow(0 calc(3 * var(--op070-u)) var(--op070-u) rgb(30 22 14 / .18)) drop-shadow(0 calc(7 * var(--op070-u)) calc(8 * var(--op070-u)) rgb(30 22 14 / .06)); }   /* --k-sh-flower, lighter: a flat frond */
.op070 .op070__sprig::before { content: ""; position: absolute; inset: 0; rotate: -24deg; transform-origin: 6% 50%;
  background: url("/skins/keepsake_table/assets/art/fern-360.webp") center / contain no-repeat; }

/* ---- the wax seal on the flap's tip: the open control, at least 104 px. The element carries the shadow (thick wax:
   a dark contact line, then the crisp cast); the wax inside is the photographed seal, turned a little ---- */
.op070 .op070-seal { position: absolute; z-index: 5; display: block; width: var(--op070-sw); aspect-ratio: 470 / 480;
  left: calc(50% - var(--op070-sw) / 2); top: calc(var(--op070-eh) * .6 - var(--op070-sw) * .52);
  min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 calc(.9 * var(--op070-u)) calc(.5 * var(--op070-u)) rgb(30 22 14 / .60)) drop-shadow(0 calc(4 * var(--op070-u)) calc(1.1 * var(--op070-u)) rgb(30 22 14 / .46)) drop-shadow(0 calc(7 * var(--op070-u)) calc(8 * var(--op070-u)) rgb(30 22 14 / .11)); }   /* --k-sh-prop */
.op070 .op070-seal:focus-visible { outline: 2px solid var(--c-primary, #7A3B22); outline-offset: 6px; }
.op070 .op070-seal__wax { position: absolute; inset: 0; display: block; rotate: -8deg;
  background: image-set(url("/skins/keepsake_table/assets/art/seal-240.webp") 1x, url("/skins/keepsake_table/assets/art/seal-480.webp") 2x) center / contain no-repeat; }

/* W2.2.x (A2089, D-189; the owner: "a very minimalistic text just below the seal, and an arrow toward the seal"):
   "Tap here to open" in small printed italic just under the seal, with the ink grain (the rule above), and a hand-drawn
   ink arrow up to the seal (the reply lid's arrow, turned). Minimal but never faint: ink-soft, 14 px on a phone up to
   22 px with the seal. Still: no glint, no motion before the tap. A second open control for the finger (the runtime
   binds every [data-kjy-open] in the gate); the seal stays the one for keyboards and screen readers. */
.op070 .op070-tap { position: absolute; z-index: 6; left: 50%; translate: -50% 0; top: calc(var(--op070-eh) * .6 + var(--op070-sw) * .5 + 2px);
  display: grid; justify-items: center; gap: 3px; min-height: 44px; margin: 0; padding: 2px 10px 6px; border: 0; background: none; cursor: pointer;
  font: italic 500 clamp(14px, calc(var(--op070-sw) * .125), 22px)/1.1 var(--k-font-body, Georgia, serif); color: var(--k-ink-soft, #5E5750);
  white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.op070 .op070-tap__a { display: block; width: max(15px, calc(var(--op070-sw) * .1)); height: auto; aspect-ratio: 18 / 22; overflow: visible; rotate: 180deg; }
.op070 .op070-tap__a path { fill: none; stroke: rgb(var(--c-primary-rgb, 122 59 34) / .85); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* ---- wide screens: the polaroid lies beside the envelope, the rings below it ---- */
@media (min-aspect-ratio: 1/1) {
  .op070 .op070__pol { right: -46%; top: 4%; rotate: 7deg; }
  .op070 .op070__rings { left: calc(var(--op070-cx) + var(--op070-ew) * .6); top: calc(var(--op070-cy) + var(--op070-eh) * .22); width: calc(var(--op070-ew) * .27); }
}
/* W1.4: a phone on its side: the seal keeps its 104 px, so the taller name card (the invitation line) sits higher */
@media (min-aspect-ratio: 1/1) and (max-height: 500px) {
  .op070 .op070__tagw { top: 3%; }
  .op070 .op070__tag { padding: 6% 7% 6%; }
}

/* ---- the open (stage 1): the bundle fades off the table onto the page ---- */
.op070.is-opening { pointer-events: none; animation: op070-out 520ms ease forwards; }
@keyframes op070-out { to { opacity: 0; visibility: hidden; } }
html.motion-reduce .op070.is-opening { animation: op070-out .4s ease forwards; }
