/* Keepsake Table skin (INV-04 Keepsake Table · Luxe, W0, A1980; plan docs/plans/plan_inv04_keepsake_table_master.md).
   A flat lay: everything lies on one table of handmade cotton paper, seen from straight above. W1.1 (A2000, the owner's
   remarks): one light straight above the top of the screen (12 o'clock), so every shadow falls straight down, darkest
   where the object meets the table and softening as it fades, at three depths: the table, the cards and prints on it,
   and the props on top (rings, flowers, cord, keepsakes). Pinyon Script writes the names and the small words in the
   couple's colour (chestnut by default), Cinzel sets the capitals, Cormorant Garamond the text, Bodoni Moda the numbers;
   every line of text carries a faint ink grain, as if printed on the cotton. The papers are grey tiles multiplied over
   the paper tokens; the rings, flowers, frame, wax seal and keepsakes are photographs (Kie, W1.1/W1.2) cut by
   scripts/keepsake_table_kit.py; the wax seal is a recolour pair (shade multiplied, sheen screened over --c-primary).
   W1.2 (A2016, the owner: the texture looked "super perfect"): no paper is perfectly flat. Every card, envelope and the
   table itself carries a relief map of real handled cotton (soft waves, a few kinks), laid on with hard-light, so a dip
   darkens the paper a few per cent; each card picks one of three (k-paper, --b, --c). The cord is retired (W1.2).
   W1.3 (A2027, the owner: "as if the light is 3–5 m away", "sort out the shadow properly"): one lamp about 4 m away,
   high at 12 o'clock. Its shadows fall straight down, crisp (blur about a quarter of the offset), offset by the
   object's real height (paper < envelope < seal and rings < frame), over an evenly lit table; a soft room fill adds
   the dark contact line and one faint halo. Rings are platinum lying flat; the wax seal is a photograph, used as shot. */
@font-face { font-family: "Pinyon Script"; src: url("assets/fonts/pinyon-script-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("assets/fonts/bodoni-moda-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --k-gate-plaster: var(--k-card); --k-gate-metal: #B08A45;
  --k-font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --k-font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --k-font-body: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --k-font-num: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --k-paper: #F3F0EA; --k-card: #FCFAF6; --k-paper-deep: #E4DED3; --k-photo-white: #FCFBF8;
  --k-ink: #2B2724; --k-ink-soft: #5E5750;
  /* W2.2 (A2057, the owner: the names "a slightly darker shade … so it's more prominent … everywhere"): every word written
     in the couple's script colour uses the engine's darker shade of it (the couple's colour with 20 % black) */
  --k-script-ink: var(--c-primary-dark);
  --k-line: rgb(var(--c-secondary-rgb) / .62);
  --k-dark: #1F2A25; --k-on-dark: #F6F2EA; --k-on-dark-soft: rgba(246, 242, 234, .84);
  --k-light-ground: transparent;
  --k-gold-foil: linear-gradient(100deg, #8C6A2E 0%, #C9A55E 22%, #F1DFA6 38%, #B8924F 52%, #E6CD8A 70%, #8C6A2E 100%);
  /* the shared art, named once (absolute paths, so a section reads them the same from any folder) */
  --k-kt-table: url("/skins/keepsake_table/assets/art/table-768.webp");
  --k-kt-card: url("/skins/keepsake_table/assets/art/card-384.webp");
  --k-kt-band-shade: url("/skins/keepsake_table/assets/art/band-shade.webp");
  --k-kt-band-light: url("/skins/keepsake_table/assets/art/band-light.webp");
  /* W1.2: the flowers are our own renders now (ivory roses, eucalyptus, dried fern and grasses, lit from the top) */
  --k-kt-spray-tl: url("/skins/keepsake_table/assets/art/spray-a-640.webp");
  --k-kt-spray-br: url("/skins/keepsake_table/assets/art/spray-b-560.webp");
  --k-kt-gyp: url("/skins/keepsake_table/assets/art/gyp2-360.webp");
  --k-kt-rose: url("/skins/keepsake_table/assets/art/rose2-240.webp");
  --k-kt-fern: url("/skins/keepsake_table/assets/art/fern-360.webp");
  --k-kt-euc: url("/skins/keepsake_table/assets/art/euc-360.webp");
  --k-kt-petal: url("/skins/keepsake_table/assets/art/petal-160.webp");
  --k-kt-dk-t: url("/skins/keepsake_table/assets/art/deckle-t.webp");
  --k-kt-dk-b: url("/skins/keepsake_table/assets/art/deckle-b.webp");
  --k-kt-dk-l: url("/skins/keepsake_table/assets/art/deckle-l.webp");
  --k-kt-dk-r: url("/skins/keepsake_table/assets/art/deckle-r.webp");
  --k-kt-inkgrain: url("/skins/keepsake_table/assets/art/ink-grain-192.webp");
  --k-kt-inkline: url("/skins/keepsake_table/assets/art/ink-line-v.webp");
  /* W1.3: polished platinum rings lying flat, shot from straight above on flat slate blue, four designs in use (a plain
     pair, the engagement ring beside its band, two linked bands, one band) */
  --k-kt-rings: url("/skins/keepsake_table/assets/art/ring-pt-pair-480.webp");
  --k-kt-rings-stack: url("/skins/keepsake_table/assets/art/ring-pt-stack-480.webp");
  --k-kt-rings-interlock: url("/skins/keepsake_table/assets/art/ring-pt-interlock-480.webp");
  --k-kt-ring1: url("/skins/keepsake_table/assets/art/ring-pt-band-320.webp");
  /* W1.3: the hand-poured seal the owner picks from six (docs/plans/evidence_inv04_kt_w13/seals_contact.jpg) */
  --k-kt-seal: image-set(url("/skins/keepsake_table/assets/art/seal-240.webp") 1x, url("/skins/keepsake_table/assets/art/seal-480.webp") 2x);
  --k-ar-seal: 470 / 480;
  --k-kt-spray-c: url("/skins/keepsake_table/assets/art/spray-c-560.webp");
  --k-kt-frame: image-set(url("/skins/keepsake_table/assets/art/frame-480.webp") 1x, url("/skins/keepsake_table/assets/art/frame-840.webp") 2x);
  --k-kt-wr-a: url("/skins/keepsake_table/assets/art/wrinkle-a-768.webp");
  --k-kt-wr-b: url("/skins/keepsake_table/assets/art/wrinkle-b-768.webp");
  --k-kt-wr-c: url("/skins/keepsake_table/assets/art/wrinkle-c-768.webp");
  --k-kt-table-relief: url("/skins/keepsake_table/assets/art/table-relief-1024.webp");
  --k-kt-window: url("/skins/keepsake_table/assets/art/window-light-1024.webp");
  /* one lamp about 4 m away, high at 12 o'clock (W1.3, owner: "as if the light is 3–5 m away"; it felt "1 foot away").
     Every shadow falls straight down in three layers: the dark contact line where the object meets the table, the
     cast shadow (offset about .36 × the object's height, its edge crisp: a far lamp is small, so the blur is about a
     quarter of the offset, not the wide soft fall a near lamp gives), and one faint halo from the room. No offset gap,
     so nothing floats. By height: paper → card (box) or cut (filter), an envelope with a card in it → thick, seal,
     rings and keepsakes → prop, the carved frame → frame, flowers → flower. --k-u grows with the objects on screen
     (phones .8, tablets 1, computers 1.15). A filter turns with its element (AG-T162): the element that carries one is
     never turned, only the art inside it. */
  --k-u: calc(1px * var(--k-shs, 1));
  --k-sh-card: 0 0 0 calc(.5 * var(--k-u)) rgb(30 22 14 / .16), 0 calc(.8 * var(--k-u)) calc(.4 * var(--k-u)) rgb(30 22 14 / .40),
    0 calc(2 * var(--k-u)) var(--k-u) rgb(30 22 14 / .26), 0 calc(4 * var(--k-u)) calc(7 * var(--k-u)) calc(-2 * var(--k-u)) rgb(30 22 14 / .08);
  --k-sh-cut: drop-shadow(0 calc(.8 * var(--k-u)) calc(.4 * var(--k-u)) rgb(30 22 14 / .46)) drop-shadow(0 calc(2.6 * var(--k-u)) calc(.8 * var(--k-u)) rgb(30 22 14 / .32))
    drop-shadow(0 calc(5 * var(--k-u)) calc(7 * var(--k-u)) rgb(30 22 14 / .08));
  --k-sh-thick: drop-shadow(0 var(--k-u) calc(.5 * var(--k-u)) rgb(30 22 14 / .50)) drop-shadow(0 calc(4.2 * var(--k-u)) calc(1.2 * var(--k-u)) rgb(30 22 14 / .36))
    drop-shadow(0 calc(8 * var(--k-u)) calc(10 * var(--k-u)) rgb(30 22 14 / .09));
  --k-sh-prop: drop-shadow(0 calc(.9 * var(--k-u)) calc(.5 * var(--k-u)) rgb(30 22 14 / .60)) drop-shadow(0 calc(4 * var(--k-u)) calc(1.1 * var(--k-u)) rgb(30 22 14 / .46))
    drop-shadow(0 calc(7 * var(--k-u)) calc(8 * var(--k-u)) rgb(30 22 14 / .11));
  --k-sh-frame: drop-shadow(0 calc(1.2 * var(--k-u)) calc(.6 * var(--k-u)) rgb(30 22 14 / .58)) drop-shadow(0 calc(12 * var(--k-u)) calc(2.6 * var(--k-u)) rgb(30 22 14 / .42))
    drop-shadow(0 calc(20 * var(--k-u)) calc(20 * var(--k-u)) rgb(30 22 14 / .10));
  --k-sh-flower: drop-shadow(0 var(--k-u) calc(.6 * var(--k-u)) rgb(30 22 14 / .40)) drop-shadow(0 calc(6 * var(--k-u)) calc(1.8 * var(--k-u)) rgb(30 22 14 / .32))
    drop-shadow(0 calc(10 * var(--k-u)) calc(12 * var(--k-u)) rgb(30 22 14 / .08));
  /* a box-shadow list (fabric swatches lie flat) */
  --k-sh-ribbon: 0 calc(.8 * var(--k-u)) calc(.4 * var(--k-u)) rgb(30 22 14 / .48), 0 calc(2 * var(--k-u)) var(--k-u) rgb(30 22 14 / .24);
  /* paper thickness on a rectangle: its top edge catches the light, its bottom edge a faint dark line */
  --k-edge: inset 0 .75px 0 rgb(255 255 255 / .75), inset 0 -.6px 0 rgb(52 40 28 / .10);
  /* letterpress: the ink sits a hair into the cotton, so the light from the top catches the paper under each stroke */
  --k-press: 0 .5px 0 rgb(255 253 248 / .55), 0 -.4px 0 rgb(43 39 36 / .10);
  --k-s-1: 4px; --k-s-2: 8px; --k-s-3: 12px; --k-s-4: 16px; --k-s-5: 24px; --k-s-6: 32px; --k-s-7: 48px; --k-s-8: 64px; --k-s-9: 96px;
  --k-gutter: 18px; --k-section-pad: 72px; --k-measure: 560px;
  --k-ease: cubic-bezier(.22, 1, .36, 1);
}
:root { --k-shs: .8; }
@media (min-width: 700px) { :root { --k-gutter: 32px; --k-section-pad: 104px; --k-shs: 1; } }
@media (min-width: 1100px) { :root { --k-shs: 1.15; } }

/* ---------- base: the table is the page (it scrolls with the keepsakes lying on it) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--k-paper); scrollbar-gutter: stable; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--k-ink);
  /* system font on body: whitespace behind the gate must not pull web fonts before the tap */
  font: 400 1rem/1.6 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  /* the cotton's fibre (384 px) under the sheet's soft waves (1280 px): the two repeats never line up on screen */
  background: var(--k-kt-table-relief) 0 0 / 1280px 1280px repeat, var(--k-kt-table) 0 0 / 384px 384px repeat, var(--k-paper);
  background-blend-mode: hard-light, multiply;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.k-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.kjy-main { font-family: var(--k-font-body); position: relative; overflow: hidden; overflow: clip; }
/* W2.5 (A2125, D-197; the owner on his iPhone: phones "too zoomed in … everything too much in the face", try 10–15 %):
   on phones the whole page below the opener is drawn at 88 %, as if the table were seen from a little further away.
   The column keeps one screen's width inside (the padding), so every section lays out exactly as approved, only
   smaller, with more table at the sides; the clip stays at the screen's edge, so props still run off it. Measured in
   WebKit 26.4 and Chrome 156: zoom scales px, rem and vw alike, and getBoundingClientRect stays in on-screen px. The
   opener (outside .kjy-main) keeps filling the screen. One number: --k-pz (.9 = 10 %, .85 = 15 %). */
:root { --k-pz: 1; }
@media (max-width: 759.98px) {
  :root { --k-pz: .88; }
  .kjy-main, .kjy-footer { zoom: var(--k-pz); }
  .kjy-main { padding-inline: calc(50vw * (1 / var(--k-pz) - 1)); }
  html .kjy-main .k-btn { min-height: max(46px, calc(44px / var(--k-pz))); } /* a tap stays at least 44 px on the screen */
}

/* ---------- shared type ---------- */
.k-kicker { font: 400 .8rem/1.5 var(--k-font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--k-ink-soft); }
.k-title { font: 400 clamp(2.7rem, 11.5vw, 3.8rem)/1.08 var(--k-font-script); color: var(--k-script-ink); }
.k-caps { font-family: var(--k-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--k-ink); }
.k-script { font-family: var(--k-font-script); font-weight: 400; color: var(--k-script-ink); }
.k-amp { font: 400 1.4em/1 var(--k-font-script); color: var(--c-secondary-dark); text-transform: none; letter-spacing: 0; }
.k-rule { display: block; width: 200px; height: auto; margin: var(--k-s-4) auto 0; color: var(--c-secondary); }

/* ---------- materials ---------- */
/* cotton card stock: the card tile multiplied over the card colour, under a sheet of real handled paper's relief (W1.2)
   stretched over the whole card (cover: one sheet per card, never stretched out of shape); --b and --c are other parts
   of the same paper, so two cards side by side never match. Corners a hair soft: no card is razor-cut. */
.k-paper { background-color: var(--k-card); background-image: var(--k-kt-wr-a), var(--k-kt-card); background-size: cover, 192px 192px;
  background-position: 50% 50%, 0 0; background-repeat: no-repeat, repeat; background-blend-mode: hard-light, multiply; border-radius: 1.5px; }
.k-paper--b { background-image: var(--k-kt-wr-b), var(--k-kt-card); }
.k-paper--c { background-image: var(--k-kt-wr-c), var(--k-kt-card); }
/* a deckled edge: torn strips on all four sides round a solid middle (mask-image reads the strips' alpha) */
.k-deckle {
  -webkit-mask: var(--k-kt-dk-t) 0 0 / 512px 14px repeat-x, var(--k-kt-dk-b) 0 100% / 512px 14px repeat-x,
    var(--k-kt-dk-l) 0 50% / 14px calc(100% - 26px) no-repeat, var(--k-kt-dk-r) 100% 50% / 14px calc(100% - 26px) no-repeat,
    linear-gradient(#000 0 0) 50% 50% / calc(100% - 24px) calc(100% - 24px) no-repeat;
  mask: var(--k-kt-dk-t) 0 0 / 512px 14px repeat-x, var(--k-kt-dk-b) 0 100% / 512px 14px repeat-x,
    var(--k-kt-dk-l) 0 50% / 14px calc(100% - 26px) no-repeat, var(--k-kt-dk-r) 100% 50% / 14px calc(100% - 26px) no-repeat,
    linear-gradient(#000 0 0) 50% 50% / calc(100% - 24px) calc(100% - 24px) no-repeat;
}
/* satin in the couple's colour (the dress code's fabric swatch only; the ribbon is retired, W1.1): the folds multiply,
   the sheen screens */
.k-satin { display: block; background-color: var(--c-primary); background-repeat: no-repeat; background-size: 100% 100%; background-blend-mode: screen, multiply; }
.k-satin--band { background-image: var(--k-kt-band-light), var(--k-kt-band-shade); }
/* platinum bands lying flat: photographs (W1.1, owner: the code-drawn rings "look weird and fake"; W1.3: gold read
   "cheap" and the opener's ring stood up, so platinum, shot from straight above). The element carries the shadow and is
   never turned; the picture sits on ::before, which a section may turn. A plain pair by default; --stack is the
   engagement ring beside its band (the opener), --interlock two linked bands (the closing). The pair's old child rings
   stay hidden; a lone .k-ring (the calendar) is the single band, its hole clear over the day. */
.k-rings { display: block; position: relative; aspect-ratio: 480 / 325; filter: var(--k-sh-prop); pointer-events: none; }
.k-rings::before { content: ""; position: absolute; inset: 0; background: var(--k-art, var(--k-kt-rings)) center / contain no-repeat; }
.k-rings--stack { --k-art: var(--k-kt-rings-stack); aspect-ratio: 480 / 337; }
.k-rings--interlock { --k-art: var(--k-kt-rings-interlock); aspect-ratio: 480 / 300; }
.k-rings > .k-ring { display: none; }
.k-ring { display: block; aspect-ratio: 1; background: var(--k-kt-ring1) center / contain no-repeat; }
/* a hand-poured wax seal (the opener's, the hero's, the reply's): a photograph used as shot (W1.3, owner: the recoloured
   seal "looks a bit fake"). The element carries the shadow; ::before may turn (≤ 10°, its light is baked in). */
.k-wax { display: block; position: relative; aspect-ratio: var(--k-ar-seal); filter: var(--k-sh-prop); pointer-events: none; }
.k-wax::before { content: ""; position: absolute; inset: 0; background: var(--k-kt-seal) center / contain no-repeat; }
/* a photo print with its white frame (a polaroid: the deep foot carries a handwritten line); the same paper relief */
.k-polaroid { display: block; padding: 6% 6% 0; background-color: var(--k-photo-white); background-image: var(--k-kt-wr-b), var(--k-kt-card);
  background-size: cover, 160px 160px; background-repeat: no-repeat, repeat; background-blend-mode: hard-light, multiply; border-radius: 1.5px; box-shadow: var(--k-edge), var(--k-sh-card); }
.k-polaroid > img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.04; object-fit: cover; background: #D9D3C8;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
/* flowers lying on the table: the element carries the shadow (straight down) and is never turned; the picture sits on
   ::before, which a section turns (".x__fl::before { rotate: … }"). Only small turns: light baked into a photo turns
   with it (AG-T284); a mirror (scale: -1 1) keeps the light on top. */
.k-flora { display: block; position: relative; filter: var(--k-sh-flower); pointer-events: none; }
.k-flora::before { content: ""; position: absolute; inset: 0; background: var(--k-art) center / contain no-repeat; }
.k-flora--tl { --k-art: var(--k-kt-spray-tl); aspect-ratio: 628 / 640; }
.k-flora--br { --k-art: var(--k-kt-spray-br); aspect-ratio: 503 / 560; }
.k-flora--gyp { --k-art: var(--k-kt-gyp); aspect-ratio: 360 / 229; }
.k-flora--rose { --k-art: var(--k-kt-rose); aspect-ratio: 240 / 202; }
.k-flora--fern { --k-art: var(--k-kt-fern); aspect-ratio: 360 / 208; }
.k-flora--euc { --k-art: var(--k-kt-euc); aspect-ratio: 360 / 114; }
.k-flora--petal { --k-art: var(--k-kt-petal); aspect-ratio: 156 / 160; }
/* W1.3: a sparse corner sprinkle (cluster at its upper left, loose petals trailing off): the hero's top-left corner */
.k-flora--c { --k-art: var(--k-kt-spray-c); aspect-ratio: 560 / 498; }
/* the keepsakes: the same rule, shadow on the element, art inside */
.k-acc { display: block; position: relative; filter: var(--k-sh-prop); pointer-events: none; }
.k-acc::before { content: ""; position: absolute; inset: 0; background: var(--k-art) center / contain no-repeat; }
.k-acc--spool { --k-art: url("/skins/keepsake_table/assets/art/spool-560.webp"); aspect-ratio: 560 / 522; }
.k-acc--scissors { --k-art: url("/skins/keepsake_table/assets/art/scissors-560.webp"); aspect-ratio: 531 / 560; }
.k-acc--pen { --k-art: url("/skins/keepsake_table/assets/art/pen-560.webp"); aspect-ratio: 347 / 560; }
.k-acc--ink { --k-art: url("/skins/keepsake_table/assets/art/ink-560.webp"); aspect-ratio: 399 / 530; }
.k-acc--pearls { --k-art: url("/skins/keepsake_table/assets/art/pearls-560.webp"); aspect-ratio: 321 / 560; }
.k-acc--key { --k-art: url("/skins/keepsake_table/assets/art/key-560.webp"); aspect-ratio: 212 / 560; }
.k-acc--stamps { --k-art: url("/skins/keepsake_table/assets/art/stamps-560.webp"); aspect-ratio: 560 / 343; }
/* (no wax-seal stamp tool: the owner, W1.3) */
/* W1.4 (A2034): window light on the table (the owner's pick): soft white panes (scripts/keepsake_table_kit.py --only
   window) laid over everything at a low opacity, so it only lightens and no word gets darker; the section places it */
.k-window { display: block; position: absolute; pointer-events: none; aspect-ratio: 1; background: var(--k-kt-window) center / contain no-repeat; opacity: .2; } /* pane centres lift the paper about 3.5–4 % (measured, A2034) */

/* ---------- buttons: pills with a double gold rule, or solid in the couple's colour ---------- */
.k-btn, .kjy-cal__toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--k-s-2);
  min-height: 46px; padding: 0 var(--k-s-5); border-radius: 999px;
  font: 400 .78rem/1 var(--k-font-display); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.k-btn--solid { background: var(--c-primary); color: #FBF9F4; border: 1px solid var(--c-primary-dark);
  box-shadow: inset 0 0 0 2px var(--c-primary), inset 0 0 0 3px rgb(255 255 255 / .28), 0 calc(.8 * var(--k-u)) calc(.4 * var(--k-u)) rgb(30 22 14 / .30), 0 calc(2 * var(--k-u)) var(--k-u) rgb(30 22 14 / .16); }
.k-btn--solid:active { background: var(--c-primary-dark); }
.k-btn--line, .kjy-cal__toggle { background: var(--k-card); color: var(--k-ink); border: 1px solid var(--c-secondary);
  box-shadow: inset 0 0 0 3px var(--k-card), inset 0 0 0 4px rgb(var(--c-secondary-rgb) / .55), 0 calc(.8 * var(--k-u)) calc(.4 * var(--k-u)) rgb(30 22 14 / .22), 0 calc(1.8 * var(--k-u)) calc(.9 * var(--k-u)) rgb(30 22 14 / .12); }
.k-btn--line:active, .kjy-cal__toggle:active { background: var(--k-paper-deep); }
.k-ico { width: 18px; height: 18px; flex: none; }

/* ---------- "ink" write-on: a soft mask sweeps left to right, once (Pinyon swashes are wide) ---------- */
.k-ink { display: inline-block; padding: .3em .8em .5em; margin: -.3em -.8em -.5em; }
html.kjy-fx [data-k-write] .k-ink {
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
  mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
html.kjy-fx [data-k-write].is-in .k-ink {
  -webkit-mask-position: 0 0; mask-position: 0 0;
  transition-property: -webkit-mask-position, mask-position;
  transition-duration: 1.4s; transition-timing-function: cubic-bezier(.5, 0, .2, 1);
}
html.kjy-fx [data-k-write].is-done .k-ink { -webkit-mask: none; mask: none; }

/* ---------- printed ink (W1.1, owner: the type looked "shiny and smooth" beside the textured paper) ----------
   Every line of text carries a faint grain (ink-grain-192: mean alpha .92, the cotton showing through where the ink
   missed a fibre) and a hair of letterpress (--k-press). Zero specificity, so a section opts out with .k-nogr. A mask
   ends at the element's box (AG-T285), so a heading that holds a .k-ink span (any depth) leaves the grain to the span,
   which carries room for Pinyon's swashes; only the innermost text holder is masked (never twice). Buttons, fields and
   pictures stay crisp. Note for stage 2: the write-on
   rules above replace this mask while they run (W2 merges the two). */
:where([data-kjy-section]) :where(h1, h2, h3, h4, p, li, dt, dd, label, legend, figcaption, time, .k-ink, .k-grain):where(:not(.k-nogr, :has(.k-ink, .k-grain, p, h1, h2, h3, h4, li, dt, dd, label, legend, figcaption, time), :has(.k-btn, button, input, select, textarea, img, .k-ring, .k-rings, .k-acc, .k-flora, .k-wax))) {
  -webkit-mask: var(--k-kt-inkgrain) 0 0 / 192px 192px repeat; mask: var(--k-kt-inkgrain) 0 0 / 192px 192px repeat;
  text-shadow: var(--k-press);
}

/* ---------- engine footer + sound toggle ---------- */
.kjy-footer { font: 500 .6875rem/1.4 var(--k-font-body); position: relative; z-index: 1; padding: var(--k-s-6) var(--k-gutter) calc(var(--k-s-8) + env(safe-area-inset-bottom)); text-align: center; }
.kjy-footer a { display: inline-flex; align-items: center; gap: 14px; padding: 14px 8px; font: 400 .6875rem/1 var(--k-font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--k-ink-soft); text-decoration: none; }
.kjy-footer__logo { display: block; width: 72px; height: 36px; }
.kjy-footer__logo--porcelain { display: none; }
.kjy-sound {
  position: fixed; z-index: 90;
  top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid rgb(var(--c-secondary-rgb) / .7);
  background: rgb(251 249 244 / .94); color: var(--c-primary); box-shadow: 0 4px 14px rgb(52 40 28 / .16);
}
.kjy-preview ~ .kjy-sound { top: calc(64px + env(safe-area-inset-top)); }
.kjy-sound[aria-pressed="true"] .kjy-sound__off,
.kjy-sound[aria-pressed="false"] .kjy-sound__on { display: none; }
