/* Talking head. Everything is namespaced .dl- so nothing leaks into the site. */
:root {
  --talk-accent: #88c0d0;
  --talk-paper: #fffdf7;
  --talk-ink: #2b2925;
  --talk-hl: rgba(136, 192, 208, 0.42);
}
[data-theme="dark"] {
  --talk-paper: #26241f;
  --talk-ink: #f1efe9;
  --talk-hl: rgba(136, 192, 208, 0.32);
}

.dl {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  font-size: 15px;
}
.dl [hidden] { display: none !important; }
/* Over a project overlay (play/projects.js), so it can talk about what's open. */
.dl.over { z-index: 101; }
@media print { .dl { display: none; } }

/* Head ------------------------------------------------------------------ */

.dl-actor {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--hw);
  height: var(--hh);
  opacity: 0;
  will-change: transform;
}
.dl-actor.on { opacity: 1; }
/* Shrink the head, not the actor: scale on the actor would scale its position too. */
.dl.quiet .dl-head { scale: 0.8; }

.dl-shadow {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -12px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.16);
  filter: blur(3px);
  animation: dl-shadow 3.2s ease-in-out infinite;
}
[data-theme="dark"] .dl-shadow { background: rgba(0, 0, 0, 0.5); }

.dl-head {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 100%;
  -webkit-tap-highlight-color: transparent;
}
.dl-head { touch-action: none; cursor: grab; }
.dl.dragging .dl-head { cursor: grabbing; }
.dl-head:focus-visible { outline: 2px solid var(--strong); outline-offset: 8px; border-radius: 40%; }

.dl-bob { position: absolute; inset: 0; animation: dl-bob 3.2s ease-in-out infinite; }
.dl-wob { position: absolute; inset: 0; transform-origin: 50% 90%; }

.dl-skull,
.dl-jaw { position: absolute; inset: 0; }
.dl-skull { z-index: 2; transform-origin: 18% calc(var(--m) * 100%); }
.dl-jaw { z-index: 3; }
.dl-skull img,
.dl-jaw img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* The straight cut: one photo, clipped into a top half and a bottom half. */
.dl-skull img { clip-path: inset(0 0 calc((1 - var(--m)) * 100%) 0); }
.dl-jaw img { clip-path: inset(calc(var(--m) * 100%) 0 0 0); }

/* Inside of the mouth, only visible in the gap when the skull lifts. */
.dl-cavity {
  position: absolute;
  z-index: 1;
  left: calc(var(--cx0) * 100% + 1.5%);
  right: calc((1 - var(--cx1)) * 100% + 1.5%);
  top: calc((var(--m) - 0.2) * 100%);
  height: 21%;
  border-radius: 12% 12% 46% 46% / 20% 20% 70% 70%;
  background:
    radial-gradient(ellipse 34% 30% at 50% 100%, #b23a4a 0 98%, transparent 100%),
    linear-gradient(#120707, #3a1216);
}
/* Upper teeth ride on the skull, tucked behind the jaw until it opens. */
.dl-teeth {
  position: absolute;
  z-index: 1;
  left: calc(var(--mx0) * 100% + 2%);
  right: calc((1 - var(--mx1)) * 100% + 2%);
  top: calc(var(--m) * 100% - 1px);
  height: 3.6%;
  border-radius: 0 0 5px 5px;
  background: #f7f3ea;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.dl-skull img { z-index: 2; }

.dl-blush {
  position: absolute;
  z-index: 3;
  width: 24%;
  height: 10%;
  top: calc((var(--m) - 0.15) * 100%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 400ms ease;
  background:
    repeating-linear-gradient(115deg, transparent 0 4px, rgba(200, 50, 80, 0.75) 4px 5.5px),
    radial-gradient(closest-side, rgba(240, 90, 115, 0.6), rgba(240, 90, 115, 0));
  -webkit-mask: radial-gradient(closest-side, #000 60%, transparent);
  mask: radial-gradient(closest-side, #000 60%, transparent);
}
.dl-blush.l { left: calc(var(--mx0) * 100% - 19%); }
.dl-blush.r { left: calc(var(--mx1) * 100% - 5%); }
.dl.shy .dl-blush { opacity: 1; }

/* Emotes: ! ? thinking dots and sleepy z's pop above the head. */
.dl-emote {
  position: absolute;
  right: -10px;
  top: -20px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  background: var(--talk-paper);
  color: var(--talk-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  font: 700 16px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  pointer-events: none;
}
.dl-emote.on { display: inline-flex; }
.dl-emote.bang { background: var(--talk-accent); color: #0a0907; }
.dl-emote.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: dl-dot 1s ease-in-out infinite;
}
.dl-emote.dots i:nth-child(2) { animation-delay: 150ms; }
.dl-emote.dots i:nth-child(3) { animation-delay: 300ms; }
.dl-emote.zz { background: none; box-shadow: none; color: var(--muted); font-weight: 400; }
.dl-emote.zz i { font-style: normal; animation: dl-z 2.4s ease-in infinite; opacity: 0; }
.dl-emote.zz i:nth-child(2) { animation-delay: 800ms; font-size: 13px; }
.dl-emote.zz i:nth-child(3) { animation-delay: 1600ms; font-size: 11px; }

/* "weee" when the head gets thrown around. */
.dl-shout {
  position: absolute;
  left: 50%;
  top: -26px;
  opacity: 0;
  white-space: nowrap;
  color: var(--strong);
  font: 700 18px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 var(--bg), 0 -2px 0 var(--bg), 2px 0 0 var(--bg), -2px 0 0 var(--bg);
  pointer-events: none;
}

/* Hand ------------------------------------------------------------------ */

.dl-hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  color: var(--strong);
  visibility: hidden;
  will-change: transform;
}
.dl-hand.on { visibility: visible; }
.dl-hand-in { transform-origin: 62% 92%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.16)); }
.dl-hand svg,
.dl-hand img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.dl-hand svg path { fill: none; stroke: currentColor; }
.dl-hand svg path:first-child { fill: var(--bg); }

/* Knocking on the glass leaves a ring where the knuckles hit. */
.dl-ripple {
  position: absolute;
  width: 90px;
  height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  pointer-events: none;
}

/* Speech bubble ---------------------------------------------------------- */

.dl-talk {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 290px;
  pointer-events: none;
  transform-origin: var(--tail, 80%) 100%;
}
.dl.chat .dl-talk { width: min(380px, calc(100vw - 24px)); }

.dl-bubble,
.dl-choices,
.dl-form { pointer-events: auto; }
.dl-bubble {
  position: relative;
  min-height: 66px;
  padding: 20px 26px 20px;
  border-radius: 34px 30px 32px 36px / 30px 34px 30px 32px;
  background: var(--talk-paper);
  color: var(--talk-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.16);
  line-height: 1.5;
  cursor: default;
}
.dl-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: var(--tail, 80%);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.dl-tag {
  position: absolute;
  top: -12px;
  left: 20px;
  padding: 3px 12px 4px;
  border-radius: 999px;
  background: var(--talk-accent);
  color: #0a0907;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}
.dl-tools {
  position: absolute;
  top: 7px;
  right: 12px;
  display: flex;
  gap: 2px;
}
.dl-tools button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dl-tools button:hover { color: var(--strong); }
.dl-tools svg { width: 13px; height: 13px; }
.dl-mute .off { display: none; }
.dl.muted .dl-mute .on { display: none; }
.dl.muted .dl-mute .off { display: block; }

.dl-echo {
  margin: 0 46px 4px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-text {
  margin: 0;
  min-height: 1.5em;
  padding-right: 18px;
  max-height: 9em;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dl-echo[hidden] + .dl-text::before {
  content: '';
  float: right;
  width: 30px;
  height: 1em;
}
.dl-text.clip { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.5em); mask-image: linear-gradient(to bottom, transparent, #000 1.5em); }
.dl-text a { color: inherit; text-decoration-color: var(--talk-accent); }

.dl-row { display: none; }
.dl.chat .dl-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  width: calc(100% - var(--hw) - 14px);
  min-height: calc(var(--hh) + 18px);
  padding-top: 18px;
}

.dl-choices {
  display: flex;
  flex-direction: column;
  padding: 7px 6px;
  border-radius: 22px;
  background: var(--talk-paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.dl-choices button {
  position: relative;
  padding: 5px 14px 5px 26px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--talk-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dl-choices button::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left: 7px solid var(--talk-accent);
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
}
.dl-choices button:hover::before,
.dl-choices button:focus-visible::before { opacity: 1; transform: translate(0, -50%); }
.dl-choices button:focus-visible { outline: none; }

/* The 1 to 10 scale for the profit vs ethics question. */
.dl-choices.scale { align-self: stretch; width: 100%; gap: 4px; padding: 10px 10px 8px; }
.dl-scale { display: flex; gap: 3px; }
.dl-scale button { flex: 1; min-width: 0; padding: 7px 0; border-radius: 9px; text-align: center; font-variant-numeric: tabular-nums; }
.dl-scale button::before { content: none; }
.dl-scale button:hover,
.dl-scale button:focus-visible { background: var(--talk-hl); }
.dl-scale-ends { display: flex; justify-content: space-between; margin: 0; padding: 0 4px; font-size: 12px; color: var(--talk-ink); opacity: 0.55; }

.dl-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 4px 4px 16px;
  border-radius: 999px;
  background: var(--talk-paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.dl-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--talk-ink);
  font: inherit;
  font-size: 14px;
}
.dl-form input::placeholder { color: var(--muted); }
.dl-form .dl-mic {
  background: none;
  color: var(--muted);
}
.dl-form .dl-mic:hover { color: var(--strong); }
.dl.listening .dl-form .dl-mic {
  background: #bf616a;
  color: #fff;
  animation: dl-rec 1.2s ease-in-out infinite;
}
.dl-form button {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--talk-accent);
  color: #0a0907;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dl-form button:disabled { opacity: 0.45; cursor: default; }
.dl-form button svg { width: 14px; height: 14px; }
.dl-form:focus-within { box-shadow: 0 0 0 1.5px var(--talk-accent), 0 8px 24px rgba(0, 0, 0, 0.14); }

.dl-fine {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
}

/* The cat ------------------------------------------------------------------ */

.dl-cat {
  position: absolute;
  left: 0;
  bottom: 10px;
  z-index: 2;
  color: var(--strong);
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.14));
}
/* A black cat on a near-black page: a faint rim so she doesn't vanish. */
[data-theme="dark"] .dl-cat { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.08)); }
.dl-cat-in { transform-origin: 50% 100%; }
.dl-cat svg,
.dl-cat img,
.dl-cat .walk { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-drag: none; }
.dl-cat svg .fill { fill: var(--bg); }
.dl-cat:not(.pet) .lie,
.dl-cat:not(.pet).lying .walk { display: none; }
.dl-cat:not(.pet).lying .lie { display: block; }
.dl-cat.walking .leg { transform-box: fill-box; transform-origin: 50% 0; animation: dl-leg 340ms ease-in-out infinite alternate; }
.dl-cat.walking .leg.b { animation-direction: alternate-reverse; }
.dl-cat.pet .dl-cat-in > * { display: none; }
.dl-cat.pet.walking .walk,
.dl-cat.pet.lying .lie,
.dl-cat.pet.sleeping .sleep,
.dl-cat.pet.belly .belly { display: block; }
.dl-cat .walk { background-repeat: no-repeat; animation: dl-walk 800ms infinite; }
.dl-cat.lying .lie,
.dl-cat.sleeping .sleep { animation: dl-breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.dl-cat.sleeping::after {
  content: 'z';
  position: absolute;
  right: 18%;
  top: -4px;
  color: var(--muted);
  opacity: 0;
  animation: dl-z 2.4s ease-in infinite;
}
.dl-heart {
  position: absolute;
  left: 50%;
  top: -6px;
  opacity: 0;
  color: #bf616a;
  font-size: 16px;
  pointer-events: none;
}

/* Things the hand touches on the page ------------------------------------ */

.dl-held {
  position: relative;
  z-index: 60;
  background: var(--bg);
  border-radius: 4px;
  box-shadow: 0 0 0 8px var(--bg), 0 16px 40px 6px rgba(0, 0, 0, 0.2);
  will-change: transform;
}
a.dl-held { display: inline-block; }

.dl-lit {
  background-image: linear-gradient(var(--talk-hl), var(--talk-hl));
  background-repeat: no-repeat;
  background-position: 0 88%;
  animation: dl-lit 2600ms ease forwards;
}
.dl-lit-box {
  outline: 1.5px dashed var(--talk-accent);
  outline-offset: 10px;
  border-radius: 6px;
  animation: dl-box 2600ms ease forwards;
}

@keyframes dl-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes dl-shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.86); opacity: 0.7; }
}
@keyframes dl-dot {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-3px); opacity: 1; }
}
@keyframes dl-z {
  0% { transform: translate(0, 4px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translate(10px, -18px); opacity: 0; }
}
@keyframes dl-walk {
  from { background-position-x: 0%; }
  to { background-position-x: 100%; }
}
@keyframes dl-leg {
  from { transform: rotate(22deg); }
  to { transform: rotate(-22deg); }
}
@keyframes dl-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.04); }
}
@keyframes dl-rec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(191, 97, 106, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(191, 97, 106, 0); }
}
@keyframes dl-lit {
  0% { background-size: 0% 46%; }
  18%, 82% { background-size: 100% 46%; }
  100% { background-size: 0% 46%; background-position: 100% 88%; }
}
@keyframes dl-box {
  0% { outline-color: transparent; outline-offset: 18px; }
  15%, 80% { outline-color: var(--talk-accent); outline-offset: 10px; }
  100% { outline-color: transparent; }
}

@media (max-width: 640px) {
  .dl { font-size: 14px; }
  .dl-talk { width: min(290px, calc(100vw - 24px)); }
  .dl-bubble { padding: 18px 20px; }
}

/* Carrying: a copy of the thing rides under the head; the real one fades. */
.dl-carried {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35);
  transform-origin: 0 0;
  pointer-events: none;
}
.dl-gone { opacity: 0.12; transition: opacity 300ms ease; }

/* Feeding: while something is being dragged, the head leans in for it. */
.dl.hungry .dl-head { scale: 1.08; transition: scale 200ms ease; }
.dl.chomping .dl-head { scale: 1.18; }

/* The second brain: which notes the head is pulling from. */
.dl-recall {
  margin: 0 46px 6px 0;
  color: var(--talk-accent);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.dl-recall::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: dl-recall 1.2s ease-in-out infinite; }
@keyframes dl-recall { 50% { opacity: 0.3; } }

/* [[show:id]]: a picture the head holds up next to the bubble. */
.dl-show {
  position: fixed;
  z-index: 3;
  margin: 0;
  padding: 8px;
  border-radius: 14px;
  background: var(--talk-paper);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.4);
  transform: rotate(-2.5deg);
  pointer-events: auto;
  cursor: pointer;
  animation: dl-show-in 360ms cubic-bezier(.34, 1.56, .64, 1);
}
.dl-show img { display: block; width: 100%; height: auto; border-radius: 8px; }
.dl-show.out { opacity: 0; transform: rotate(-2.5deg) scale(0.94); transition: opacity 260ms ease, transform 260ms ease; }
@keyframes dl-show-in { from { opacity: 0; transform: rotate(-8deg) scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .dl-show { animation: none; } }

/* Moved to tears (dlHead.cry): the sad face, tears running down from both eyes, a little sob. */
.dl-tears { position: absolute; inset: 0; z-index: 4; display: none; pointer-events: none; }
.dl.crying .dl-tears { display: block; }
.dl-tears span { position: absolute; top: 53.4%; width: 5%; height: 21%; margin-left: -2.5%; }
.dl-tears span.l { left: 30%; }
.dl-tears span.r { left: 68.6%; top: 52.6%; }
.dl-tears span::before {
  content: '';
  position: absolute;
  left: 30%;
  right: 30%;
  top: 0;
  bottom: 6%;
  border-radius: 99px;
  background: linear-gradient(rgba(222, 243, 255, 0.95), rgba(170, 220, 250, 0.6) 60%, rgba(170, 220, 250, 0));
  transform-origin: 50% 0;
  animation: dl-streak 700ms ease-out both;
}
.dl-tears i { position: absolute; inset: 0; transform-origin: 50% 0; animation: dl-tear 1.15s cubic-bezier(.55, 0, .85, .5) infinite; }
.dl-tears i + i { animation-delay: 0.58s; }
.dl-tears span.r i { animation-delay: 0.3s; }
.dl-tears span.r i + i { animation-delay: 0.88s; }
.dl-tears i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 130%;
  aspect-ratio: 1;
  margin-left: -65%;
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  background: radial-gradient(circle at 64% 64%, #f6fcff 0 14%, #a9dcfa 38%, #4ea4df 100%);
  box-shadow: 0 0 0 0.5px rgba(30, 90, 140, 0.35);
}
.dl.crying .dl-bob { animation: dl-sob 1.5s ease-in-out infinite; }
@keyframes dl-tear {
  0% { transform: translateY(0) scale(0.2); opacity: 0; }
  15% { transform: translateY(2%) scale(1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateY(105%); opacity: 0; }
}
@keyframes dl-streak { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes dl-sob {
  0%, 52%, 100% { transform: translateY(0); }
  10% { transform: translateY(1.5px); }
  20% { transform: translateY(-1px); }
  30% { transform: translateY(1.5px); }
  40% { transform: translateY(-0.5px); }
}

/* Clapping (dlHead.clap): two hands come up under the chin. talk.js swings them. */
.dl-clap {
  position: absolute;
  left: 50%;
  top: 86%;
  z-index: 4;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.34, 1.56, .64, 1);
}
.dl.clapping .dl-clap { opacity: 1; transform: none; }
.dl-clap img {
  position: absolute;
  top: 0;
  width: calc(var(--hw) * 0.4);
  max-width: none;
  height: auto;
  transform-origin: 50% 100%;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}
.dl-clap .l { right: 0; transform: translateX(-34%) rotate(-16deg) scale(-0.6, 1); }
.dl-clap .r { left: 0; transform: translateX(34%) rotate(16deg) scale(0.6, 1); }

@media (prefers-reduced-motion: reduce) {
  .dl-tears span::before, .dl-tears i { animation: none; }
  .dl-tears i { transform: translateY(42%); }
  .dl-tears i + i { display: none; }
  .dl.crying .dl-bob { animation: none; }
  .dl-clap { transition: none; transform: none; }
  .dl-clap .l { transform: translateX(24%) rotate(3deg) scale(-0.6, 1); }
  .dl-clap .r { transform: translateX(-24%) rotate(-3deg) scale(0.6, 1); }
}

/* The pitch (talk.js pitch()): the page dims around a spotlight, the head
   comes up close to the screen and asks, two answers under it. */
.dl-pitch-dim {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 55%), rgba(0, 0, 0, 0.12) 0, rgba(0, 0, 0, 0.42) 34%, rgba(0, 0, 0, 0.55) 100%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 320ms ease;
}
[data-theme="dark"] .dl-pitch-dim { background: radial-gradient(circle at var(--px, 50%) var(--py, 55%), rgba(0, 0, 0, 0.25) 0, rgba(0, 0, 0, 0.62) 34%, rgba(0, 0, 0, 0.72) 100%); }
.dl-pitch-dim.on { opacity: 1; }
.dl.pitching .dl-talk { width: min(340px, calc(100vw - 32px)); }
.dl.pitching .dl-bubble { font-size: 19px; line-height: 1.4; text-align: center; }
.dl.pitching .dl-tools, .dl.pitching .dl-tag { display: none; }
.dl.pitching .dl-shadow { opacity: 0.6; }
.dl-pitch-ask {
  position: absolute;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: auto;
  white-space: nowrap;
}
.dl-pitch-ask button {
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}
.dl-pitch-ask button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.dl-pitch-ask button:active { transform: scale(0.97); }
.dl-pitch-ask button:focus-visible { outline: 2px solid var(--talk-accent); outline-offset: 3px; }
.dl-pitch-ask .yes { background: var(--talk-accent); color: #0d1418; font-weight: 500; box-shadow: 0 10px 30px -8px rgba(136, 192, 208, 0.7); }
.dl-pitch-ask .no { background: var(--talk-paper); color: var(--talk-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
@media (prefers-reduced-motion: reduce) { .dl-pitch-dim { transition: none; } }

/* "rate me": their camera for a few seconds, in a little bubble by the head. */
.dl-cam { position: fixed; z-index: 75; width: 132px; height: 132px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); box-shadow: 0 0 0 3px #fff, 0 14px 34px -14px rgba(0, 0, 0, 0.5); animation: dl-cam-in 260ms cubic-bezier(.34, 1.56, .64, 1); }
@keyframes dl-cam-in { from { opacity: 0; transform: scaleX(-1) scale(0.6); } }
@media (prefers-reduced-motion: reduce) { .dl-cam { animation: none; } }
