/* Comment stickers in the hero trail (kommenttitarrat.js), in the same style as the photo stickers
   (kursorileikkeet/*.webp): a print with a fine dot screen on cream paper, cut out with straight scissor cuts and
   tilted. Palaver 26.11.2026: smaller, softer fade, white, slightly tilted, no dates. Inside, the comment is drawn like TikTok's comment list on a pure white background (Ville 26.11.2026:
   "täysvalkoinen tausta siis"). No shadows. */
.opening > .kuvajalki > .kt-tarra {
  /* Plain white comment, slightly tilted; no paper edge or scissor cut (Ville 26.11.2026: "poista leikattu fiilis
     mutta käytä valkoista ja vähän kulmittain"). */
  position: absolute; width: min(250px, calc(100% - 24px)); padding: 0; background: none;
  user-select: none; text-align: left; animation: kommenttitarra 2.8s ease-in-out both;
}
.kt-tarra > .kt {
  position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 7px; align-items: start;
  padding: 8px 9px; color: #161823; background-color: #fff;
  font: 400 12px/1.3 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0;
}
.kt-av { width: 24px; height: 24px; border-radius: 50%; background: #d7d7da url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='12.5' r='5.5' fill='%23ffffff'/%3E%3Cpath d='M5 29c1.6-6 6-9 11-9s9.4 3 11 9' fill='%23ffffff'/%3E%3C/svg%3E") center / cover; }
.kt-body { min-width: 0; }
.kt-user { display: block; color: rgba(22, 24, 35, .5); font-size: 10.5px; font-weight: 500; }
.kt-text { margin: 1px 0 0; font-size: 12.5px; overflow-wrap: anywhere; }
.kt-meta { display: flex; gap: 13px; margin-top: 3px; color: rgba(22, 24, 35, .45); font-size: 10.5px; }
.kt-like { display: grid; justify-items: center; gap: 1px; padding-top: 9px; color: rgba(22, 24, 35, .5); font-size: 10px; }
.kt-like svg { width: 14px; height: 14px; }
.kt-piilo { filter: blur(4px); }
/* The photo stickers' pop (kansileike), with a longer hold so the comment can be read. */
@keyframes kommenttitarra {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(.85); }
  14%, 72% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)) scale(1); }
}
@media (max-width: 700px) { .opening > .kuvajalki > .kt-tarra { width: min(230px, calc(100% - 24px)); } }

.opening > .kuvajalki > .kt-tarra.kt-kiinni {
  pointer-events: none;
  transform: rotate(var(--tilt, 0deg));
  animation: kommenttiin .32s cubic-bezier(.2, 1.6, .4, 1) both;
}
.opening > .kuvajalki > .kt-tarra.kt-pois { animation: kommenttipois .16s ease-in both; }
@keyframes kommenttiin {
  0% { transform: rotate(calc(var(--tilt, 0deg) - 8deg)) scale(.3); }
  65% { transform: rotate(calc(var(--tilt, 0deg) + 3deg)) scale(1.06); }
  100% { transform: rotate(var(--tilt, 0deg)) scale(1); }
}
@keyframes kommenttipois { to { transform: rotate(var(--tilt, 0deg)) scale(0); } }

.opening > .kuvajalki > .kt-tarra.kt-leike {width:clamp(110px,12vw,185px);aspect-ratio:1}
.opening .kuvajalki .kt-leike img {position:static;width:100%;height:100%;object-fit:contain;animation:none}

/* The non-WebGL still uses the same press, clipped to the glass silhouette. */
.kt-lasipinta {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none;
  mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; -webkit-mask-repeat: no-repeat;
}
.kt-lasipinta > .kt-tarra {
  position: absolute; padding: 0; text-align: left;
  animation: lasitarra-painuu .36s ease-out both;
}
@keyframes lasitarra-painuu {
  from { clip-path: ellipse(0% 0% at 50% 50%); }
  to { clip-path: ellipse(77% 94% at 50% 50%); }
}
