/* The day on a branch · Luxe (core/events/017) — INV-12 Burgundy Blossom v2 · Luxe W2 (A1722; plan
   docs/plans/plan_inv12_v2_luxe_w2.md D2), a fork of core/events/015 (v2 Premium; its notes keep the history). The two-column
   programme with the ink thread, on the Luxe skin. The owner's rider (answer 2026-10-21): a blossom peels off the top bud,
   travels the thread with the scroll, turning, rests at each event while its knot opens and settles as the foot; one size for
   the bud, the rider and the foot, and a wider phone gap, so it clears the words. As it leaves an event, the words write on and
   drift out from the thread. Lite, reduced motion and no JS: no rider, the whole thread, every word. */

.ev160 { color: var(--k-ink); --ev160-lw: 1.5px; --ev160-kn: clamp(12px, 3.6cqw, 16px); --ev160-tw: 36%; --ev160-gap: clamp(34px, 9.5cqw, 44px);
  --ev160-rg: clamp(56px, 16.5cqw, 80px); /* W5c.1 (A1799, the owner: "slight more spacing between the events"): 46/13.5cqw/66 -> 56/16.5cqw/80 */ --ev160-bb: clamp(24px, 7cqw, 32px); --ev160-bud: var(--ev160-bb); --ev160-en: var(--ev160-bb); --ev160-tail: 18px;
  /* W2a (A1676; plan_inv12_v2_w2.md C3): the line sizes as tokens (date, time, name, place, venue/dress), so tablets and
     desktop set them in one place and the name can sit level with its time */
  --ev160-dfs: clamp(8.5px, 2.5cqw, 11.5px); --ev160-tfs: clamp(11px, 3.3cqw, 15px); --ev160-nfs: clamp(15px, 4.6cqw, 22px);
  --ev160-pfs: clamp(14px, 4.2cqw, 19px); --ev160-vfs: clamp(8.5px, 2.5cqw, 11.5px);
  /* the five-petal blossom of the skin's old divider, scaled into a 20-unit box; black = shown (a mask) */
  --ev160-bloom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cellipse cy='-4.6' rx='3.1' ry='4.5'/%3E%3Cellipse cy='-4.6' rx='3.1' ry='4.5' transform='rotate(72)'/%3E%3Cellipse cy='-4.6' rx='3.1' ry='4.5' transform='rotate(144)'/%3E%3Cellipse cy='-4.6' rx='3.1' ry='4.5' transform='rotate(216)'/%3E%3Cellipse cy='-4.6' rx='3.1' ry='4.5' transform='rotate(288)'/%3E%3Ccircle r='2.2'/%3E%3C/svg%3E"); }
.ev160 .ev160__in { padding: calc(var(--k-cw) * .14 + var(--k-join-room)) 0 calc(var(--k-cw) * .08); }
.ev160 > .k-join { top: calc((var(--k-cw) * .06 + var(--k-join-room)) / 2); } /* the middle of the join (the date section above ends .08 x cw) */
.ev160 .ev160__head { position: relative; display: flow-root; padding-inline: calc(var(--k-cw) * .09); text-align: center; }
.ev160 .ev160__title { margin: 0 0 clamp(18px, 5cqw, 30px); font: 400 clamp(11px, 3.4cqw, 16px)/1.2 var(--k-font-caps); letter-spacing: .34em; text-transform: uppercase; color: var(--k-wine); }
/* W2a (A1676; plan C2, owner's pick "fewer ornaments"): the gold flourish under the title is gone; the join sprig and the bud are enough */

/* the branch track (tuned A1498: top offset 5.5 → 2.5cqw, the window edge): the art fills the track and tiles down it (selectors out-rank the skin's .k-bb-art rules) */
.ev160 .ev160__track { position: relative; --ev160-bw: min(20cqw, 180px); --ev160-slot: calc(var(--ev160-bw) / var(--k-ar-branch-r, .1978) / 3);
  --ev160-air: clamp(16px, 5cqw, 28px); --ev160-gr: calc(var(--ev160-bw) * .654 + var(--ev160-air)); }
/* Luxe W1 Part 0 (A1693; plan_inv12_v2_luxe_master.md #2): one event has no branch stub beside it, and its columns
   re-centre (the reserved right gutter --ev160-gr falls to the left one; desktop never reads the token) */
.ev160 .ev160__track:not(:has(.ev160-row + .ev160-row)) { --ev160-gr: 6cqw; }
.ev160 .ev160__track:not(:has(.ev160-row + .ev160-row)) .ev160__branch { display: none; }
/* W1.1 (the owner's pick "countdown stem stub"): the branch ends a quarter slot above the track's foot and fades over half a
   slot, so no bare stem stands at the countdown's join */
/* W1.2 eye r1: the rows no longer follow the slots, so a tile's flat stem end (the seam, parked in v1) could land in full
   view with the next tile's start below it. The branch now stops exactly at a tile seam (round(), one tile = 3 slots), its
   foot fade finishing there; a track shorter than one tile keeps its whole height. Without round() the inset applies. */
.ev160 .ev160__branch { inset: 0 0 calc(var(--ev160-slot) * .25); --ev160-tile: calc(var(--ev160-slot) * 3); --ev160-t0: calc(var(--ev160-bw) * .096);
  height: max(calc(round(down, 100% - var(--ev160-t0), var(--ev160-tile)) + var(--ev160-t0)), min(100%, var(--ev160-tile) + var(--ev160-t0))); aspect-ratio: auto; background-size: var(--ev160-bw) auto; background-repeat: no-repeat repeat;
  background-position: right calc(var(--ev160-bw) * -.346) top calc(var(--ev160-bw) * .096);
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--ev160-slot) * .5), transparent); mask-image: linear-gradient(#000 calc(100% - var(--ev160-slot) * .5), transparent); }
.ev160 .ev160__branch > i { -webkit-mask-size: var(--ev160-bw) auto; mask-size: var(--ev160-bw) auto; -webkit-mask-repeat: no-repeat repeat; mask-repeat: no-repeat repeat;
  -webkit-mask-position: right calc(var(--ev160-bw) * -.346) top calc(var(--ev160-bw) * .096); mask-position: right calc(var(--ev160-bw) * -.346) top calc(var(--ev160-bw) * .096); }

/* the programme: clear of the branch on the right, the gutter on the left. --ev160-x is the thread's x from the box's left
   edge (the left padding + the time column + half the gap); the bud and the foot boxes span the same padding box */
.ev160 .ev160__prog { position: relative; padding: 0 var(--ev160-gr) 0 6cqw;
  --ev160-x: calc(6cqw + (100% - 6cqw - var(--ev160-gr)) * .36 + var(--ev160-gap) / 2); }
.ev160 .ev160__thread { position: absolute; left: var(--ev160-x); top: calc(var(--ev160-bud) * .5); bottom: calc(var(--ev160-en) * .5 + 4px);
  width: var(--ev160-lw); margin-left: calc(var(--ev160-lw) / -2); background: var(--k-wine); transform-origin: 50% 0; transform: scaleY(var(--ev160-t, 1)); }
.ev160 .ev160__crown, .ev160 .ev160__foot { margin-inline: -6cqw calc(-1 * var(--ev160-gr)); }
.ev160 .ev160__crown { position: relative; height: calc(var(--ev160-bud) * 1.8 + 6px); } /* W3 (A1732): room under the bud, so the rider's first rest never covers it (eye r1: 1.55 -> 1.8) */
.ev160 .ev160__bud { left: calc(var(--ev160-x) - var(--ev160-bud) / 2); top: 0; width: var(--ev160-bud); }
.ev160 .ev160__foot { position: relative; height: calc(var(--ev160-en) + 4px); margin-top: var(--ev160-tail); }
.ev160 .ev160-row:last-child { padding-bottom: 0; } /* W2a (plan C1, the owner's #3): a short tail, the paper under the last event is --ev160-tail */
/* the blossoms on the thread: a wine bloom with a gold heart at each time; each opens as the thread arrives (the CSS default
   is open). W2a (A1676; plan C1, the owner's #1): the foot is the kit's photo blossom in the couple's colour (k-bb-head,
   so no background here), opening as the thread arrives */
.ev160 .ev160-knot { position: absolute; background: radial-gradient(circle, var(--k-gold) 0 20%, transparent 25%), var(--k-wine);
  -webkit-mask: var(--ev160-bloom) center / contain no-repeat; mask: var(--ev160-bloom) center / contain no-repeat; }
.ev160 .ev160__end { left: calc(var(--ev160-x) - var(--ev160-en) / 2); top: 0; width: var(--ev160-en);
  opacity: var(--ev160-e, 1); scale: var(--ev160-e, 1); rotate: calc((1 - var(--ev160-e, 1)) * -72deg); }

/* the rows: the time column, the gap the thread runs down, the details */
.ev160 .ev160__list { position: relative; margin: 0; padding: 0; list-style: none; }
.ev160 .ev160-row { display: grid; grid-template-columns: var(--ev160-tw) var(--ev160-gap) minmax(0, 1fr); align-items: start;
  padding-block: calc(var(--ev160-rg) / 2); }
.ev160 .ev160-row:first-child { padding-top: clamp(10px, 3cqw, 18px); }
.ev160 .ev160-row__when { grid-column: 1; text-align: right; }
.ev160 .ev160-row__what { grid-column: 3; text-align: left; min-width: 0; }
/* W2a (A1676; plan C3, the owner's #4): in a one-day row the name's first line sits on the time's first line, where the knot is */
.ev160 .ev160-row:not(:has(.ev160-row__date)) .ev160-row__what { margin-top: calc((var(--ev160-tfs) * 1.35 - var(--ev160-nfs) * 1.2) / 2); }
/* the knot: on the thread, level with the time's first line (W2a, plan C3: a phone wraps "6:30 pm – 11:30 pm") */
.ev160 .ev160-knot { top: calc(var(--ev160-tfs) * .675); right: calc(-1 * (var(--ev160-gap) / 2 + var(--ev160-kn) / 2)); width: var(--ev160-kn); height: var(--ev160-kn);
  margin-top: calc(var(--ev160-kn) / -2); opacity: var(--ev160-k, 1); scale: var(--ev160-k, 1); rotate: calc((1 - var(--ev160-k, 1)) * -72deg); }
.ev160 .ev160-row__date { margin: 0 0 .45em; text-wrap: balance; font: 400 var(--ev160-dfs)/1.4 var(--k-font-caps); letter-spacing: .14em; text-transform: uppercase; color: var(--k-wine-soft); }
.ev160 .ev160-row__time { position: relative; margin: 0; text-wrap: balance; font: 400 var(--ev160-tfs)/1.35 var(--k-font-caps); font-variant-numeric: lining-nums;
  letter-spacing: .1em; text-transform: uppercase; color: var(--k-wine); }
.ev160 .ev160-row__name { margin: 0; text-wrap: balance; font: 400 var(--ev160-nfs)/1.2 var(--k-font-caps); letter-spacing: .08em; text-transform: uppercase; color: var(--k-ink); }
.ev160 .ev160-row__place { margin: .4em 0 0; text-wrap: balance; font: italic 500 var(--ev160-pfs)/1.3 var(--k-font-body); color: var(--k-ink-soft); }
.ev160 .ev160-row__venue, .ev160 .ev160-row__dress { margin: .75em 0 0; text-wrap: balance; font: 400 var(--ev160-vfs)/1.5 var(--k-font-caps);
  letter-spacing: .12em; text-transform: uppercase; color: var(--k-ink-soft); }
.ev160 .ev160-row__venue + .ev160-row__dress { margin-top: .45em; }

/* the near-full-width desktop card (the skin's query): the padding follows the skin's rhythm; the programme is centred on
   the card with the thread on its centre line, clear of the branch on both sides; desktop type sizes */
@media (min-aspect-ratio: 1/1) and (min-width: 1000px) {
  .ev160 { --ev160-lw: 1.75px; --ev160-kn: 18px; --ev160-gap: 64px; --ev160-rg: 92px; /* W5c.1: 76 -> 92 */ --ev160-bb: 44px; --ev160-tail: 24px;
    --ev160-dfs: 12.5px; --ev160-tfs: 17px; --ev160-nfs: 28px; --ev160-pfs: 22px; --ev160-vfs: 12.5px; }
  .ev160 > .k-join { top: calc((var(--k-dpad-t) + var(--k-join-room) - var(--k-dpad-b)) / 2); }
  .ev160 .ev160__in { padding: calc(var(--k-dpad-t) + var(--k-join-room)) 0 var(--k-dpad-b); }
  .ev160 .ev160__track { --ev160-bw: min(26cqw, 150px); }
  .ev160 .ev160__prog { padding: 0; inline-size: min(980px, calc(100% - 2 * (var(--ev160-bw) * .654 + var(--ev160-air)))); margin-inline: auto; --ev160-x: 50%; }
  .ev160 .ev160__crown, .ev160 .ev160__foot { margin-inline: 0; }
  .ev160 .ev160-row { grid-template-columns: minmax(0, 1fr) var(--ev160-gap) minmax(0, 1fr); }
  .ev160 .ev160-row__time { letter-spacing: .12em; }
  /* eye r1 (W1.1): the branch ends .4 slot early and fades over .7, so its last tile never stands as a bare stem */
  .ev160 .ev160__branch { inset: 0 0 calc(var(--ev160-slot) * .4);
    -webkit-mask-image: linear-gradient(#000 calc(100% - var(--ev160-slot) * .7 - 20px), transparent); mask-image: linear-gradient(#000 calc(100% - var(--ev160-slot) * .7 - 20px), transparent); } /* W2a (plan C4, #6): 20 px earlier, no pale grey */
}
/* W2a (A1676; plan_inv12_v2_w2.md A4): portrait tablets: the phone's two columns with tablet type and air, and the skin's
   rhythm for the padding and the join (the desktop's centred programme left 144-178 px per column on a 604-672 px card) */
@media (max-aspect-ratio: 999/1000) and (min-width: 700px) {
  .ev160 { --ev160-lw: 1.6px; --ev160-kn: 16px; --ev160-gap: 44px; --ev160-rg: 80px; /* W5c.1: 66 -> 80 */ --ev160-bb: 34px; --ev160-tail: 22px;
    --ev160-dfs: 12px; --ev160-tfs: 16px; --ev160-nfs: 24px; --ev160-pfs: 20px; --ev160-vfs: 12px; }
  .ev160 > .k-join { top: calc((var(--k-dpad-t) + var(--k-join-room) - var(--k-dpad-b)) / 2); }
  .ev160 .ev160__in { padding: calc(var(--k-dpad-t) + var(--k-join-room)) 0 var(--k-dpad-b); }
  .ev160 .ev160__track { --ev160-bw: min(20cqw, 160px); }
  .ev160 .ev160-row__time { letter-spacing: .11em; }
}

/* ---------- Luxe (W2, A1722) ---------- */
/* The rider (owner answer 1, 2026-10-21): it peels off the top bud and becomes the foot; the bud, the rider and the foot share
   one size (--ev160-bb), so it matches both. The script moves it (--ev160-ry: its centre from the programme's top; --ev160-rr:
   whole turns over the path; --ev160-ro: hidden while it sits on the bud). --ev160-x is the thread's x on the programme box */
.ev160 .ev160__rider { display: none; left: calc(var(--ev160-x) - var(--ev160-en) / 2); top: 0; width: var(--ev160-en); z-index: 3;
  translate: 0 calc(var(--ev160-ry, 0px) - 50%); rotate: var(--ev160-rr, 0deg); opacity: var(--ev160-ro, 0); }
.ev160.is-riding .ev160__rider { display: block; }
.ev160.is-riding .ev160__end { visibility: hidden; }
/* From the thread: as the rider leaves an event, its words write on in ink and drift 14 px out from the line (eye r1: 10 -> 14 px, 1100 ms) (on the .k-ink
   span, never the <p>, so the knot inside the time stays on the thread); a teardown drops is-riding, so nothing stays offset */
/* W5c.1 (A1799; the owner: "sync the blossom flower and the text reveal"): the script sets --ev160-w (0-1) on each line while the
   blossom comes in; the mask sweeps with it and the drift settles by w .5 (clear of the rider, which reaches the line later; tablet r1 at .7: 1.6 px on the first row);
   writeOn's is-in / is-done take over once the line is whole */
html.kjy-fx .ev160.is-riding .ev160-row [data-k-write]:not(.is-in) .k-ink { -webkit-mask-position: calc((1 - var(--ev160-w, 0)) * 100%) 0; mask-position: calc((1 - var(--ev160-w, 0)) * 100%) 0; }
html.kjy-fx .ev160.is-riding .ev160-row__when [data-k-write]:not(.is-in) .k-ink { translate: calc(max(0, 1 - var(--ev160-w, 0) / .5) * 14px) 0; }
html.kjy-fx .ev160.is-riding .ev160-row__what [data-k-write]:not(.is-in) .k-ink { translate: calc(max(0, 1 - var(--ev160-w, 0) / .5) * -14px) 0; }
html.kjy-fx .ev160.is-riding .ev160-row [data-k-write].is-in .k-ink { transition-property: -webkit-mask-position, mask-position, translate;
  transition-duration: 1.4s, 1.4s, 1100ms; transition-timing-function: cubic-bezier(.5, 0, .2, 1), cubic-bezier(.5, 0, .2, 1), var(--k-ease); }
