.messenger[hidden] { display: none; }
body:has(.messenger:not([hidden])) { padding-bottom: 85px; }
.close-updates {
  border: 1px solid #685335; border-radius: 6px; background: #fff9e9;
  color: #31281c; cursor: pointer; min-height: 40px; padding: 6px 12px;
  font: 700 13px/1.25 Arial, sans-serif;
}
.update-scroll:focus-visible, .close-updates:focus-visible, #update-panel .update-stories a:focus-visible {
  outline: 3px solid #255476; outline-offset: 3px;
}
.messenger {
  position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; justify-content: flex-end;
  z-index: 5; max-width: calc(100% - 24px); pointer-events: none;
}
.prophet { width: clamp(94px, 12vw, 142px); height: auto; margin-right: -13px; z-index: 1; }
.foot, .prophet-body { transform-box: fill-box; transform-origin: 50% 65%; }
.update-scroll {
  pointer-events: auto; cursor: pointer; display: flex; gap: .7em; align-items: center;
  margin: 0 4px clamp(19px, 3vw, 33px) 0; padding: 10px 14px 10px 17px; min-height: 46px;
  border: 1px solid #8a663e; border-radius: 5px 11px 10px 6px;
  background: linear-gradient(180deg,#faf0ca 0%,#f4dda0 48%,#e8c688 100%);
  box-shadow: 0 3px 10px #192d3d44, inset 4px 0 #aa795940, inset -4px 0 #aa795940;
  color: #302517; font: 700 clamp(14px, 3.9vw, 19px)/1.15 Georgia, serif;
}
.update-scroll:hover { background: #fff0c2; }
.update-panel {
  inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  padding: 0; border: 0; overflow: auto; background: transparent; color: #332919;
}
.update-panel::backdrop { background: rgba(19,31,44,.45); }
.update-paper {
  box-sizing: border-box; min-height: 100%; padding: clamp(12px, 4vw, 38px);
  background: radial-gradient(ellipse at 50% 24%, #fff7df 5%, #f4e4bf 58%, #e7cca0 100%);
}
.update-inner { box-sizing: border-box; max-width: 740px; margin: auto; position: relative; padding: 58px clamp(4px,4vw,28px) 20px; }
.close-updates { position: absolute; top: 0; right: 0; min-height: 44px; }
.close-updates span { margin-left: 4px; font-size: 18px; }
.release-number { margin: 0 0 7px; text-transform: uppercase; letter-spacing: .13em; font: 700 12px/1.4 Arial,sans-serif; color: #6d492a; }
.update-panel h2 { font: 400 clamp(38px,8vw,73px)/.98 Georgia,serif; margin: 0 0 25px; letter-spacing: -.035em; }
.update-stories { border-top: 1px solid #ab895a; }
#update-panel .update-stories a {
  display: block; padding: 15px 2px; border-bottom: 1px solid #ab895a;
  text-decoration-color: #172c40; text-underline-offset: 3px;
}
#update-panel .update-stories a,
#update-panel .update-stories a h3,
#update-panel .update-stories a h3 span { color: #172c40 !important; }
#update-panel .update-stories a:hover { text-decoration-thickness: 2px; }
.update-stories h3 { margin: 0; display: flex; justify-content: space-between; gap: 15px; font: 700 clamp(17px,4vw,25px)/1.2 Georgia,serif; }
.update-stories p { margin: 6px 22px 0 0; font: 15px/1.45 Arial,sans-serif; color: #4e3e2b; }
html:has(.update-panel[open]) { overflow: hidden; }
.rest-pose, .breath-mouth, .breath-lines { opacity: 0; }
.rest-pose, .walking-pose { transform-origin: 82px 166px; }
.wipe-arm { transform-origin: 54px 74px; }
.wipe-forearm { transform-origin: 43px 100px; }
.rest-figure { transform-origin: 82px 151px; }
@media (prefers-reduced-motion: no-preference) {
  .messenger.arriving .prophet {
    animation: walk-first var(--first-time) linear forwards,
      walk-last var(--last-time) var(--resume-time) linear forwards;
  }
  .messenger.arriving .foot {
    animation: stride var(--first-stride-time) linear var(--first-strides),
      stride-last var(--last-stride-time) var(--resume-time) linear var(--last-strides);
  }
  .messenger.arriving .foot-front { animation-name: stride-opposite, stride-opposite-last; }
  .messenger.arriving .prophet-body {
    animation: walk-bob calc(.5 * var(--first-stride-time)) ease-in-out var(--first-steps),
      walk-bob calc(.5 * var(--last-stride-time)) var(--resume-time) ease-in-out var(--last-steps);
  }
  .messenger.arriving .rest-pose { animation: face-viewer var(--rest-time) var(--first-time) ease-in-out; }
  .messenger.arriving .walking-pose { animation: turn-sideways var(--rest-time) var(--first-time) ease-in-out; }
  .messenger.arriving .wipe-arm { animation: wipe-brow var(--rest-time) var(--first-time) ease-in-out; }
  .messenger.arriving .wipe-forearm { animation: sweep-brow var(--rest-time) var(--first-time) ease-in-out; }
  .messenger.arriving .rest-figure { animation: breathe var(--rest-time) var(--first-time) ease-in-out; }
  .messenger.arriving .breath-mouth, .messenger.arriving .breath-lines {
    animation: exhale var(--rest-time) var(--first-time) ease-in-out;
  }
  .messenger.arriving .carried-scroll { animation: handoff .26s var(--walk-time) ease both; }
  .messenger.arriving .update-scroll { animation: unfurl .5s var(--walk-time) ease-out both; }
  .messenger.arriving:focus-within .prophet,
  .messenger.arriving:focus-within .prophet *,
  .messenger.arriving .update-scroll:focus-visible { animation: none; }
  .update-panel[open] .update-paper { animation: open-paper .62s cubic-bezier(.21,.73,.26,1) both; }
}
@keyframes walk-first {
  from { transform: translateX(calc(-1 * var(--walk-distance))); }
  to { transform: translateX(calc(-1 * var(--remaining-distance))); }
}
@keyframes walk-last {
  from { transform: translateX(calc(-1 * var(--remaining-distance))); }
  to { transform: translateX(0); }
}
/* The planted sandal moves back at the figure's forward speed. */
@keyframes stride {
  0%, 100% { transform: translateX(var(--first-reach)); }
  50% { transform: translateX(calc(-1 * var(--first-reach))); animation-timing-function: ease-out; }
  75% { transform: translateY(-9px) rotate(-8deg); animation-timing-function: ease-in; }
}
@keyframes stride-opposite {
  0%, 100% { transform: translateX(calc(-1 * var(--first-reach))); }
  0% { animation-timing-function: ease-out; }
  25% { transform: translateY(-9px) rotate(-8deg); animation-timing-function: ease-in; }
  50% { transform: translateX(var(--first-reach)); }
}
@keyframes stride-last {
  0%, 100% { transform: translateX(var(--last-reach)); }
  50% { transform: translateX(calc(-1 * var(--last-reach))); animation-timing-function: ease-out; }
  75% { transform: translateY(-9px) rotate(-8deg); animation-timing-function: ease-in; }
}
@keyframes stride-opposite-last {
  0%, 100% { transform: translateX(calc(-1 * var(--last-reach))); }
  0% { animation-timing-function: ease-out; }
  25% { transform: translateY(-9px) rotate(-8deg); animation-timing-function: ease-in; }
  50% { transform: translateX(var(--last-reach)); }
}
@keyframes walk-bob { 50% { transform: translateY(-2.7px) rotate(1.1deg); } }
@keyframes turn-sideways {
  0%, 100% { opacity: 1; transform: scaleX(1); }
  8%, 92% { opacity: .55; transform: translateX(-1px) scaleX(.92); }
  16%, 84% { opacity: 0; transform: translateX(-2px) scaleX(.85); }
}
@keyframes face-viewer {
  0%, 100% { opacity: 0; transform: translateX(2px) scaleX(.85); }
  8%, 92% { opacity: .55; transform: translateX(1px) scaleX(.92); }
  16%, 84% { opacity: 1; transform: scaleX(1); }
}
@keyframes wipe-brow {
  0%, 16%, 61%, 100% { transform: rotate(0); }
  29% { transform: rotate(110deg); }
  47% { transform: rotate(136deg); }
}
@keyframes sweep-brow {
  0%, 16%, 61%, 100% { transform: rotate(0); }
  29% { transform: rotate(-110deg); }
  47% { transform: rotate(-130deg); }
}
@keyframes breathe {
  0%, 59%, 87%, 100% { transform: none; }
  71% { transform: translateY(-2px) scale(1.03, 1.035); }
  81% { transform: translateY(1px); }
}
@keyframes exhale {
  0%, 70%, 88%, 100% { opacity: 0; }
  79% { opacity: 1; }
}
@keyframes handoff { to { opacity: 0; } }
@keyframes unfurl {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-3px); }
  12% { opacity: 1; }
  to { opacity: 1; clip-path: inset(0); transform: translateX(0); }
}
@keyframes open-paper {
  from { clip-path: inset(91% 2% 2% 68% round 12px); }
  to { clip-path: inset(0); }
}
@media (max-width: 540px) {
  .messenger { right: max(9px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .prophet { width: 96px; }
  .update-scroll { margin-right: 0; padding-inline: 12px; }
  @keyframes open-paper { from { clip-path: inset(91% 2% 1% 39% round 12px); } to { clip-path: inset(0); } }
}
