/* The small cards of a scene's example and its options' pictures (web/sites/kit-demo.js): on every template and Lumo,
   in the template's own look — a twin is the corner's box again, placed by the template, a step aside here. */
/* Behind the corner, peeking out inwards — up from a corner low in its frame (down from a high one) and a little aside
   — so that each one's word, moved to the edge that shows (kit-demo.js kd-word-move), is read whole. */
.kd-twin { --kd-x: 1; --kd-y: -1; --kd-n: 1; pointer-events: none; transition: transform .2s ease;
  transform: translate(calc(var(--kd-x) * var(--kd-n) * 22%), calc(var(--kd-y) * var(--kd-n) * 42%)) rotate(calc(var(--kd-x) * var(--kd-n) * 4deg)); }
.kd-twin.kd-go-left { --kd-x: -1; }
.kd-twin.kd-go-down { --kd-y: 1; }
.kd-twin.kd-step-2 { --kd-n: 2; }
.kd-twin.kd-step-3 { --kd-n: 3; }
.kd-twin.kd-go-up .kd-word-move { top: 6px !important; bottom: auto !important; }
.kd-twin.kd-go-down .kd-word-move { top: auto !important; bottom: 6px !important; }
.kd-twin .kd-word-move.kd-word-tight { left: 3px !important; right: auto !important; box-sizing: border-box; max-width: calc(100% - 6px);
  padding-left: 3px !important; padding-right: 3px !important; font-size: 8px !important; letter-spacing: 0 !important; text-transform: none !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-twin .kd-word-move.kd-word-none { display: none !important; }
/* A corner laid out in its row: lifted over its twins. */
.kd-lift { position: relative; }
/* The visitor's clip over the corner's picture; its word (after it, placed by the template) stays on top. */
.kd-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: #000; }
.kd-hidden { display: none !important; }
/* A frame's other cards (kit-demo.js putCards): small, low on the «до» side, never clicked. Their size holds against a
   frame that stretches whatever it holds («.frame-media > *»). */
.kd-extras { position: absolute !important; inset: auto auto 12px 12px !important; width: auto !important; height: auto !important; z-index: 2;
  display: flex !important; align-items: flex-end; gap: 6px; margin: 0; padding: 0; pointer-events: none; }
.kd-extras.kd-extras-raise { bottom: 44px !important; }
.kd-extras.kd-extras-raise.kd-extras-raise-more { bottom: 88px !important; }
.kd-extras.kd-extras-small { inset: auto auto 8px 8px !important; gap: 4px; }
.kd-extras.kd-extras-small.kd-extras-raise { bottom: 34px !important; }
.kd-extras.kd-extras-small.kd-extras-raise.kd-extras-raise-more { bottom: 64px !important; }
.kd-extras-small .kd-extra { flex-basis: 40px; width: 40px !important; border-width: 1.5px; border-radius: 8px; }
.kd-extras-small .kd-extra b { inset: auto 2px 2px 2px !important; padding: 0 2px; font-size: 7.5px; }
.kd-extra { position: relative !important; inset: auto !important; display: block !important; flex: 0 0 62px; width: 62px !important; height: auto !important;
  aspect-ratio: 4 / 5; overflow: hidden; border: 2px solid #fff; border-radius: 12px; background: #111; box-shadow: 0 8px 20px rgb(0 0 0 / .45); }
.kd-extra img, .kd-extra video { position: absolute !important; inset: 0 !important; display: block; width: 100% !important; height: 100% !important;
  object-fit: cover; opacity: 1 !important; transform: none !important; }
.kd-extra b { position: absolute !important; inset: auto 4px 4px 4px !important; z-index: 1; padding: 1px 4px; border-radius: 999px; background: rgb(0 0 0 / .75);
  color: #fff; font: 700 9.5px/1.4 system-ui, sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kd-pics { display: flex; gap: 8px; margin: 4px 0 2px; padding: 2px 2px 8px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.kd-pic { flex: 0 0 auto; display: grid; gap: 5px; justify-items: center; width: 78px; margin: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: center; cursor: pointer; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; }
.kd-pic img { display: block; width: 78px; height: 104px; object-fit: cover; border: 2px solid transparent; border-radius: 12px; background: rgb(127 127 127 / .18); opacity: .78; transition: opacity .15s, border-color .15s; }
.kd-pic span { max-width: 100%; font-size: 11.5px; line-height: 1.2; opacity: .78; overflow-wrap: anywhere; }
.kd-pic:hover img, .kd-pic:hover span { opacity: 1; }
.kd-pic[aria-pressed="true"] img { border-color: currentColor; opacity: 1; }
.kd-pic[aria-pressed="true"] span { font-weight: 700; opacity: 1; }
.kd-pic:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .kd-twin, .kd-pic img { transition: none; } }
