/* Static composition review: independent illustrated layers. */
.ink-flow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(1440px, 100%);
  z-index: 7;
  padding: 48px 32px 100px;
  scroll-margin-top: 170px;
}
.ink-flow-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1.72;
  isolation: isolate;
}
.ink-flow img {
  display: block;
  width: 100%;
  height: auto;
}
.ink-flow .flow-energy {
  position: absolute;
  left: 13%;
  top: 14%;
  width: 75%;
  height: 71%;
  object-fit: contain;
  z-index: 0;
  opacity: 0.75;
}
.flow-messages {
  position: absolute;
  left: 0;
  top: 8%;
  width: 29%;
  height: 83%;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}
.flow-messages .flow-message {
  width: 91%;
}
.flow-lorbo {
  position: absolute;
  left: 29%;
  top: 26%;
  width: 39%;
  height: auto;
  z-index: 3;
}
.flow-manuscripts {
  position: absolute;
  right: 0;
  top: 0;
  width: 31%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}
.flow-manuscripts img {
  height: 49%;
  object-fit: contain;
}
@media (max-width: 700px) {
  .ink-flow {
    padding: 32px 12px 60px;
  }
  .ink-flow-art {
    aspect-ratio: 0.77;
  }
  .flow-messages {
    left: 0;
    width: 43%;
  }
  .flow-lorbo {
    left: 40%;
    top: 10%;
    width: 60%;
  }
  .ink-flow .flow-energy {
    left: 4%;
    top: 18%;
    width: 92%;
    height: 60%;
    transform: rotate(20deg);
  }
  .flow-manuscripts {
    top: 55%;
    width: 100%;
    height: 45%;
    flex-direction: row;
    gap: 8px;
  }
  .flow-manuscripts img {
    width: 49%;
    height: 100%;
  }
}

/* More breathing room around the desktop conversation illustration. */
@media (min-width: 701px) {
  .flow-lorbo {
    top: 20%;
    width: 33%;
  }
  .flow-messages {
    width: 25%;
  }
}

.flow-pending .flow-messages .flow-message,
.flow-pending .flow-energy,
.flow-pending .flow-lorbo,
.flow-pending .flow-manuscripts img {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .flow-pending .flow-messages .flow-message,
  .flow-pending .flow-lorbo,
  .flow-pending .flow-manuscripts img {
    opacity: 1;
  }
  .flow-pending .flow-energy {
    opacity: 0.75;
  }
}

/* Visible captions explain the illustration without repeating the desk copy. */
.flow-conversation-label {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  margin: 0;
}
.flow-manuscripts figure {
  margin: 0;
  height: 48%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flow-manuscripts figure img {
  width: 100%;
  object-fit: contain;
}
.flow-manuscripts figcaption {
  text-align: center;
  margin: 0;
}
@media (max-width: 700px) {
  .flow-manuscripts figure {
    width: 49%;
    height: 100%;
    gap: 8px;
  }
  .flow-manuscripts figure img {
    width: 100%;
  }
  .flow-manuscripts figcaption {
    line-height: 1.5;
  }
}

/* Storybook typography and restrained bronze flourishes. */
.flow-manuscripts figure {
  gap: 12px;
}

/* Suppress invented smoke at the edges while retaining the central ring. */
.ink-flow .flow-energy {
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 27%, #000 73%, transparent 100%),
    radial-gradient(ellipse at center, #000 42%, transparent 74%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 27%, #000 73%, transparent 100%),
    radial-gradient(ellipse at center, #000 42%, transparent 74%);
  -webkit-mask-composite: source-in;
  pointer-events: none;
}

/* Soft reflected magic behind Lorbo; retain the feathered video edges. */
.ink-flow .flow-energy {
  filter: brightness(1.3) saturate(1.08);
}
.ink-flow-art::before {
  content: "";
  position: absolute;
  left: 26%;
  top: 18%;
  width: 47%;
  height: 65%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 52%,
    rgba(137, 103, 221, 0.24) 0%,
    rgba(113, 85, 198, 0.18) 32%,
    rgba(76, 121, 203, 0.09) 51%,
    transparent 72%
  );
  opacity: 1;
  transition: opacity 1s ease;
}
.flow-pending .ink-flow-art::before {
  opacity: 0;
}
@media (max-width: 700px) {
  .ink-flow-art::before {
    left: 32%;
    top: 9%;
    width: 68%;
    height: 44%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ink-flow-art::before {
    transition: none;
  }
}

/* Sparse gold ink travels behind the paper, leaving labels readable. */
.flow-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.flow-spark {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: var(--lorbo-candle);
  box-shadow: 0 0 5px 1px #edb957a0;
  opacity: 0;
  will-change: transform, opacity;
}
.flow-spark-blue {
  background: #c7b8ff;
  box-shadow: 0 0 5px 1px #8e87dd80;
}
.flow-messages .flow-message,
.flow-manuscripts figure {
  will-change: transform, opacity;
}

/* Tighter conversation queue, with stable image boxes across random variants. */
.flow-messages .flow-message {
  object-fit: contain;
}

/* Close the visualization with its explanatory ribbon. */
.ink-flow {
  display: flex;
  flex-direction: column;
}
.ink-flow-art {
  order: 0;
}

/* A painted log supports Lorbo, behind the character and side columns. */
.ink-flow .flow-sitting-log {
  position: absolute;
  left: 48.5%;
  top: 52%;
  width: 54%;
  height: auto;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}
@media (max-width: 700px) {
  .ink-flow .flow-sitting-log {
    left: 69%;
    top: 41%;
    width: 68%;
  }
}

/* Shared blank wood artwork with accessible, editable HTML labels. */
.flow-conversation-label,
.flow-manuscripts figcaption {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff0d1;
  font-family: var(--lorbo-heading);
  font-weight: 600;
  text-shadow: 0 1px 2px #180d08;
  padding: 14px 28px;
  text-wrap: balance;
}
.flow-conversation-label {
  bottom: calc(100% + 12px);
}
.flow-manuscripts figcaption {
  width: 100%;
  max-width: none;
  min-height: 86px;
  flex-shrink: 0;
  font-size: 23px;
  line-height: 1.15;
}
.flow-manuscripts figure img {
  height: calc(100% - 98px);
}
@media (max-width: 700px) {
  .flow-conversation-label {
    bottom: calc(100% + 8px);
  }
  .flow-manuscripts figcaption {
    font-size: 17px;
    min-height: 80px;
    padding: 12px 18px;
  }
  .flow-manuscripts figure img {
    height: calc(100% - 92px);
  }
}

/* Match the desk's muted walnut without dimming the live lettering. */
.flow-conversation-label,
.flow-manuscripts figcaption {
  background: none;
  isolation: isolate;
}
.flow-manuscripts figcaption {
  position: relative;
}
.flow-conversation-label::before,
.flow-manuscripts figcaption::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  z-index: -1;
  background: none;
  filter: brightness(0.72) saturate(0.68);
  pointer-events: none;
}
.ink-flow .flow-sitting-log {
  filter: brightness(0.7) saturate(0.65);
}

/* Center the two uncaptioned manuscripts as one compact group. */
@media (min-width: 701px) {
  .flow-manuscripts figure {
    flex-shrink: 0;
    gap: 0;
  }
}

/* Matching headings, with smaller bubbles aligned by speaker. */
.flow-messages .flow-message {
  width: 82%;
}
.flow-results-label {
  left: auto;
  right: 2%;
  width: 27%;
  top: calc(20% - 88px);
  bottom: auto;
  z-index: 2;
}

/* Quiet stars behind the desk and the entire purple stage. */
.lorbo-starfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, black 420px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 420px);
}
.lorbo-star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--star-color);
  opacity: var(--alpha);
  box-shadow: 0 0 6px var(--star-color);
}
.lorbo-starfield.is-active .lorbo-star {
  animation-play-state: running;
}
.lorbo-star.is-sparkle {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.lorbo-star.is-sparkle::before,
.lorbo-star.is-sparkle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, var(--star-color), transparent);
  border-radius: 50%;
}
.lorbo-star.is-sparkle::before {
  left: 43%;
  right: 43%;
}
.lorbo-star.is-sparkle::after {
  top: 43%;
  bottom: 43%;
  background: linear-gradient(90deg, transparent, var(--star-color), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .lorbo-starfield .lorbo-star {
    animation: none;
  }
}

/* Caption-sized narration stays above Lorbo without shifting the artwork. */
.flow-narration {
  position: absolute;
  left: 48.5%;
  margin: 0;
  pointer-events: none;
  text-align: center;
  font:
    600 clamp(16px, 1.35vw, 21px) / 1.45 "Plus Jakarta Sans",
    sans-serif;
  color: #fff7e9;
}
.flow-narration span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  text-wrap: balance;
  opacity: 0;
}
.flow-narration span:first-child {
  opacity: 1;
}
.flow-narration span::before {
  content: "";
  position: absolute;
  inset: 2px -8px;
  z-index: -1;
  border-radius: 10px;
}
@media (max-width: 700px) {
  .flow-narration span {
    padding: 6px;
  }
}

/* Quiet celestial labels frame the conversation and its two outputs. */
.flow-conversation-label {
  background: none;
  line-height: 1.2;
}
.flow-conversation-label::before {
  font:
    14px / 1 Georgia,
    serif;
  color: #c8ad7c;
}
@media (max-width: 700px) {
  .flow-conversation-label::before {
    font-size: 11px;
    margin-right: 7px;
  }
}

/* Small fabric labels give each column a base without extending the log. */
.flow-conversation-label {
  height: 80px;
  min-height: 80px;
  box-sizing: border-box;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff0d6;
  text-shadow: 0 2px 3px #180c24;
  isolation: isolate;
}
.flow-conversation-label::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
}
@media (min-width: 701px) {
  .ink-flow .flow-sitting-log {
    width: 44%;
    top: 54.8%;
  }
}
@media (max-width: 700px) {
  .flow-conversation-label {
    height: 64px;
    min-height: 64px;
    padding: 0 26px 4px;
  }
  .flow-results-label {
    top: auto;
    bottom: -30px;
    right: 25%;
    width: 50%;
  }
}

/* The log carries the rotating narration beneath Lorbo. */
.flow-narration {
  z-index: 4;
  text-shadow: 0 2px 3px #110b07;
}
.flow-narration span::before {
  background: none;
}

/* Selected worn leather backing; lettering remains live HTML. */
.flow-conversation-label {
  padding: 0 36px 2px;
  font-size: 23px;
}
.flow-conversation-label::before {
  background-image: none;
  background-position: center 48%;
  background-size: 100% 170%;
}
@media (max-width: 700px) {
  .flow-conversation-label {
    font-size: 17px;
    padding-inline: 24px;
  }
}

/* Larger narration above the hat, independent of the log. */
.flow-narration {
  transform: translateX(-50%);
  width: 39%;
  height: 68px;
  font-size: 22px;
}
@media (max-width: 700px) {
  .flow-narration {
    left: 70%;
    width: 58%;
    height: 70px;
    font-size: 16px;
  }
}

/* One shared visual center for the leather labels and the log face. */
.flow-conversation-label::before {
  filter: brightness(0.8) saturate(0.68) contrast(0.86) blur(0.18px)
    drop-shadow(0 3px 4px #09041170);
}
@media (min-width: 701px) {
  .flow-messages .flow-conversation-label {
    top: calc(100% + 24px);
    bottom: auto;
  }
  .flow-results-label {
    top: calc(72.3% - 40px);
    bottom: auto;
  }
}

/* Symmetric footer geometry: one scene center, equal labels and clearances. */
@media (min-width: 701px) {
  .ink-flow .flow-sitting-log {
    left: 50%;
  }
  .flow-lorbo {
    left: 33.5%;
  }
  .flow-narration {
    left: 50%;
  }
  .flow-messages .flow-conversation-label {
    left: 2%;
    width: 96%;
  }
  .flow-results-label {
    right: 2.5%;
    width: 24%;
  }
}

/* A faint, irregular galactic band behind the existing star field. */
.lorbo-starfield::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: min(1100px, 100%);
  pointer-events: none;
  background: url(lorbo-faint-galaxy.svg) center / cover no-repeat;
  opacity: 0.85;
}

/* Four compact bubbles share the same footer baseline as the result stacks. */
@media (max-width: 700px) {
  .flow-messages {
    top: 0;
    height: 47%;
  }
}

/* Bronze invitation straddles the lower edge of Lorbo's log. */
.flow-access-button {
  position: absolute;
  left: 50%;
  top: 81.5%;
  transform: translate(-50%, -50%);
  z-index: 5;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 300px;
  height: 78px;
  padding: 0 28px;
  text-decoration: none;
  white-space: nowrap;
  color: #24180e;
  font:
    900 18px / 1.15 "Arial Black",
    Arial,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 0 #ffe3adb0;
  cursor: pointer;
}
.flow-access-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  filter: drop-shadow(0 5px 5px #09041180);
  transition: filter 0.18s;
}
.flow-access-button span {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}
.flow-access-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.8;
  flex: none;
}
.flow-access-button:is(:hover, :focus-visible)::before {
  filter: brightness(1.27) saturate(1.08) drop-shadow(0 0 7px #eac27d88)
    drop-shadow(0 0 20px #e2ac5b55) drop-shadow(0 5px 5px #09041180);
}
.flow-access-button:focus-visible {
  outline: var(--lorbo-focus-ring);
  outline-offset: 5px;
  border-radius: 999px;
}
@media (max-width: 700px) {
  .flow-access-button {
    left: 69%;
    top: 60%;
    width: 210px;
    max-width: 60%;
    height: 60px;
    font-size: 13px;
    gap: 8px;
    padding-inline: 18px;
  }
  .flow-access-button::before {
    border-width: 0 30px;
    border-image-width: 0 30px;
  }
  .flow-access-button svg {
    width: 16px;
    height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-access-button::before {
    transition: none;
  }
}

/* Column headings sit above the intact illustration, clear of the log. */
@media (min-width: 701px) {
  .ink-flow {
    padding-top: 136px;
  }
  .ink-flow-art > .flow-chat-label,
  .ink-flow-art > .flow-results-label {
    position: absolute;
    top: -88px;
    bottom: auto;
    height: 80px;
    min-height: 80px;
    margin: 0;
  }
  .ink-flow-art > .flow-chat-label {
    right: auto;
  }
  .ink-flow-art > .flow-results-label {
    left: auto;
  }
}
@media (max-width: 700px) {
  .ink-flow {
    padding-top: 110px;
  }
  .ink-flow-art > .flow-chat-label,
  .ink-flow-art > .flow-results-label {
    position: absolute;
    top: -78px;
    bottom: auto;
    width: 44%;
    height: 64px;
    min-height: 64px;
    margin: 0;
    padding-inline: 17px;
    font-size: 16px;
  }
  .ink-flow-art > .flow-chat-label {
    left: 0;
    right: auto;
  }
  .ink-flow-art > .flow-results-label {
    left: auto;
    right: 0;
  }
}

/* A deliberate one-by-one conversation entrance. */
.flow-messages .flow-message {
  opacity: 0;
}
.flow-narration {
  top: calc(8% - 32px);
}
@media (max-width: 700px) {
  .flow-narration {
    top: -25px;
  }
}
body[data-motion="off"] .flow-messages .flow-message {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .flow-messages .flow-message {
    opacity: 1;
  }
}

/* A quiet message composer anchors the illustrated conversation. */
.flow-message-composer {
  position: absolute;
  left: 2%;
  top: calc(72.3% - 22px);
  width: 25%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 3;
  pointer-events: none;
  font:
    400 15px / 1.4 "Plus Jakarta Sans",
    sans-serif;
}
.flow-composer-send {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.flow-composer-send svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 700px) {
  .flow-message-composer {
    left: 0;
    top: 49%;
    width: 43%;
    padding: 5px 6px 5px 11px;
    font-size: 12px;
    gap: 5px;
  }
}

/* Hand-painted paper and a bronze send coin belong to Lorbo's world. */
.flow-message-composer {
  height: 56px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  isolation: isolate;
  padding: 0 16px 0 22px;
  text-shadow: none;
}
.flow-message-composer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.flow-message-composer > span:first-child {
  display: block;
  font:
    400 15px / 1 "Plus Jakarta Sans",
    sans-serif;
}
.flow-composer-send {
  width: 30px;
  height: 30px;
}
.flow-composer-send svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}
@media (max-width: 700px) {
  .flow-message-composer {
    height: 43px;
  }
  .flow-message-composer > span:first-child {
    font-size: 12px;
  }
  .flow-composer-send {
    width: 25px;
    height: 25px;
  }
  .flow-composer-send svg {
    width: 15px;
    height: 15px;
  }
}

/* Bronze message field matches the site's bronze controls. */
.flow-message-composer {
  padding-left: 24px;
  padding-right: 13px;
}
.flow-message-composer::before {
  background: none;
  border: solid transparent;
  border-width: 0 30px;
  border-image: url(lorbo-bronze-frame.webp) 0 16.4355% fill / 0 30px / 0 stretch;
  filter: drop-shadow(0 3px 5px #09041166);
}
@media (max-width: 700px) {
  .flow-message-composer {
    padding-left: 17px;
    padding-right: 10px;
  }
  .flow-message-composer::before {
    border-width: 0 24px;
    border-image-width: 0 24px;
  }
}

.flow-manuscripts .flow-book img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Recessed dark input well with a restrained bronze frame. */
.flow-message-composer {
  color: #eadcc9;
}
.flow-message-composer::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  background: #30241f;
  border: 1px solid #a783534f;
  box-shadow: inset 0 2px 4px #100b0980;
}
.flow-message-composer > span:first-child {
  color: #eadcc9;
  font-weight: 400;
  text-shadow: none;
}
.flow-composer-send {
  background: transparent url(lorbo-bronze-toggle-coin.webp) center / contain no-repeat;
  border: 0;
  color: #342315;
  box-shadow: none;
  filter: brightness(1.12) drop-shadow(0 1px 2px #08050380);
}

/* Live conversation text travels together with its illustrated bubble. */
.flow-message {
  position: relative;
  flex-shrink: 0;
}
.ink-flow .flow-message > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.flow-message-text {
  align-items: center;
  justify-content: flex-start;
  color: #30203f;
  pointer-events: none;
}
.flow-message[data-side="right"] .flow-message-text {
  color: #30203f;
}
@media (max-width: 700px) {
  .flow-messages .flow-message {
    width: 92%;
    aspect-ratio: 1.9;
  }
  .flow-messages .flow-message[data-side="right"] {
    translate: 8.69565% 0;
  }
}

/* Larger conversation bubbles, with ordinary left-aligned wrapping. */
@media (min-width: 701px) {
  .flow-messages {
    height: 68%;
  }
  .flow-messages .flow-message {
    width: 86%;
  }
  .flow-messages .flow-message[data-side="right"] {
    translate: 16.27907% 0;
  }
  .flow-message-composer {
    top: calc(82.3% - 22px);
  }
}
@media (max-width: 700px) {
  .flow-message-text {
    inset: 14% 11% 20%;
    justify-content: flex-start;
    text-wrap: wrap;
  }
}

/* Content-sized nine-slice parchment bubbles preserve the painted silhouette. */
.flow-messages {
  display: block;
}
.flow-messages .flow-message,
.flow-messages .flow-message:nth-of-type(even),
.flow-messages .flow-message[data-side="right"] {
  position: absolute;
  left: 0;
  top: 0;
  translate: none;
  align-self: auto;
  width: max-content;
  max-width: 92%;
  min-width: 90px;
  aspect-ratio: auto;
  height: auto;
  padding: 15px 24px 23px;
  box-sizing: border-box;
  isolation: isolate;
  transform-origin: 50% 80%;
}
.ink-flow .flow-message > img {
  display: none;
}
.flow-message::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: solid transparent;
  border-width: 15px 26px 22px;
  border-image-source: var(--bubble-art);
  border-image-slice: 150 270 190 fill;
  border-image-width: 15px 26px 22px;
  border-image-repeat: stretch;
}
.flow-message-text {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  font:
    500 16px / 1.35 "Plus Jakarta Sans",
    sans-serif;
  text-align: left;
  white-space: normal;
  hyphens: none;
}
@media (max-width: 700px) {
  .flow-messages .flow-message {
    max-width: 100%;
    min-width: 70px;
    padding: 11px 16px 18px;
  }
  .flow-message::before {
    border-width: 11px 18px 17px;
    border-image-width: 11px 18px 17px;
  }
  .flow-message-text {
    font-size: 12px;
    line-height: 1.3;
  }
}

/* The conversation ends at the log's midpoint; capacity follows actual height. */
.flow-message-composer > span:first-child {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}
.flow-message-composer.is-writing > span:first-child {
  color: #fff0db;
}
.flow-message-composer.is-writing > span:first-child::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-left: 2px;
  background: #f5ddb2;
  animation: flow-caret 0.8s steps(1) infinite;
}
.flow-composer-send {
  transition:
    transform 0.14s,
    filter 0.14s;
}
.flow-message-composer.is-sending .flow-composer-send {
  transform: translateY(2px) scale(0.86);
  filter: brightness(0.76) drop-shadow(0 0 3px #e6bd71aa);
}
.flow-message.is-typing {
  min-width: 90px;
  width: 90px;
}
.flow-typing-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
}
.flow-typing-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #564164;
  animation: flow-typing-dot 1.05s ease-in-out infinite;
}
.flow-typing-dots i:nth-child(2) {
  animation-delay: 0.13s;
}
.flow-typing-dots i:nth-child(3) {
  animation-delay: 0.26s;
}
@keyframes flow-typing-dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@keyframes flow-caret {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-typing-dots i,
  .flow-message-composer.is-writing > span:first-child::after {
    animation: none;
  }
  .flow-composer-send {
    transition: none;
  }
}
body[data-motion="off"] .flow-typing-dots i {
  animation: none;
}

/* Chat text wraps only at the available edge, without typographic rebalancing. */
.flow-message-text {
  text-wrap: wrap;
  text-wrap-mode: wrap;
  text-wrap-style: auto;
  word-break: normal;
  overflow-wrap: normal;
}

/* Keep the composer line box stable and leave room for every descender. */
.flow-message-composer > span:first-child {
  text-box-trim: none;
  text-box-edge: auto;
  line-height: 1.5;
  height: 30px;
  padding-block: 3px;
  box-sizing: border-box;
  flex-basis: 0;
  align-content: center;
  overflow-x: hidden;
  overflow-y: hidden;
}
.flow-message-composer.is-writing > span:first-child::after {
  vertical-align: -0.12em;
}
/* Completed incoming text replaces the dots without animating width or height. */
.flow-message .flow-message-text {
  transition: none;
}
.flow-manuscripts .flow-book img {
  transform: scale(1.3);
  transform-origin: center;
}
@media (max-width: 700px) {
  .flow-message-composer > span:first-child {
    height: 27px;
    line-height: 1.5;
  }
  .flow-manuscripts .flow-book img {
    transform: scale(1.2);
  }
}

.flow-message-composer > span:first-child {
  scroll-behavior: auto;
}

/* Keep the caption's glow inside its own band, never the side-column flow. */
.flow-narration {
  clip-path: inset(-25px 0 -25px 0);
}
/* Use the outer edges of the existing content area for both side columns. */
@media (min-width: 701px) {
  .flow-messages,
  .flow-message-composer {
    left: 0;
  }
}

/* Permanent narration lines. */
.flow-narration[data-narration="lines"] {
  left: 50%;
  top: auto;
  bottom: calc(80% + 20px);
  width: 46%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: translateX(-50%);
  clip-path: none;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.5;
}
.flow-narration[data-narration="lines"] span {
  position: static;
  inset: auto;
  display: block;
  padding: 0;
  opacity: 1;
  clip-path: none;
  text-wrap: balance;
}
.flow-narration[data-narration="lines"] span:first-child {
  margin-bottom: 3px;
  color: #f3dfb5;
  font-size: 1.2em;
}
.flow-narration[data-narration="lines"] span::before {
  content: none;
}

/* Desktop explainer: quieter column labels and the site's editorial typography. */
@media (min-width: 701px) {
  .ink-flow-art > .flow-conversation-label {
    top: -74px;
    height: auto;
    min-height: 0;
    padding: 0;
    background: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
    letter-spacing: 0;
    color: #e5d4be;
    text-shadow: 0 2px 8px #08040e70;
  }
  .ink-flow-art > .flow-conversation-label::before {
    content: none;
  }
  .ink-flow-art > .flow-conversation-label::after {
    content: "";
    display: block;
  }
  .flow-narration[data-narration="lines"] {
    width: 40%;
    gap: 0;
    bottom: calc(80% + 24px);
  }
  .flow-narration[data-narration="lines"] .flow-narration-title {
    margin: 0 0 14px;
    font: 600 clamp(36px, 3.2vw, 46px) / 1.05 var(--lorbo-heading, var(--lorbo-heading));
  }
  .flow-narration[data-narration="lines"] .flow-narration-copy {
    margin: 0;
    font: 400 16px / 1.65 var(--lorbo-body, var(--lorbo-body));
    text-shadow: 0 1px 6px #08040e80;
  }
  .flow-narration[data-narration="lines"] .flow-narration-copy span {
    margin: 0;
    font: inherit;
    color: inherit;
  }
}

/* The hero's display face ties the explainer headings to the opening scene. */
@media (min-width: 701px) {
  .ink-flow-art > .flow-conversation-label {
    font-family: var(--lorbo-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.35;
  }
  .flow-narration[data-narration="lines"] .flow-narration-title {
    font-family: var(--lorbo-display);
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 18px;
  }
  .flow-narration[data-narration="lines"] .flow-narration-copy {
    font-weight: 500;
    color: #eee2f3;
  }
  .flow-manuscripts figure img,
  .flow-manuscripts .flow-book img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transform: none;
  }
}

/* Shared column centerlines and larger pinned sheets. */
@media (min-width: 701px) {
  .ink-flow-art > .flow-chat-label {
    width: 25%;
  }
  .ink-flow-art > .flow-results-label,
  .flow-manuscripts {
    right: 0;
    width: 27%;
  }
  .flow-manuscripts {
    top: -2.5%;
    height: 82%;
    gap: 24px;
    justify-content: flex-start;
  }
  .flow-manuscripts figure {
    height: calc((100% - 24px) / 2);
  }
  .flow-narration[data-narration="lines"] .flow-narration-title {
    line-height: 1.2;
    background: linear-gradient(180deg, #fff1c9 0%, #e9d8b6 35%, #b7a2bf 72%, #9778ad 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.55px #d5b984;
    text-shadow: none;
    filter: drop-shadow(0 1px 0 #241a3180) drop-shadow(0 3px 5px #251b3570);
  }
  .flow-narration[data-narration="lines"] .flow-narration-copy {
    font-size: 22px;
    line-height: 1.55;
  }
}

/* Large-screen breathing room; keep the established compact layout below 1100px. */
@media (min-width: 1100px) {
  .ink-flow {
    padding-bottom: 220px;
  }
  .flow-narration[data-narration="lines"] {
    top: 0;
    bottom: auto;
  }
  .flow-narration[data-narration="lines"] .flow-narration-title {
    margin-bottom: 24px;
  }
  .flow-narration[data-narration="lines"] .flow-narration-copy {
    line-height: 1.8;
  }
  .flow-lorbo {
    top: calc(20% + 80px);
  }
  .ink-flow .flow-sitting-log {
    top: calc(54.8% + 80px);
  }
  .flow-access-button {
    top: calc(81.5% + 80px);
  }
  .ink-flow .flow-energy {
    top: calc(14% + 80px);
  }
  .ink-flow-art::before {
    top: calc(18% + 80px);
  }
}

/* Let the conversation fill the column from the composer up to its heading. */
@media (min-width: 701px) {
  .flow-messages {
    top: 0;
  }
}

/* Solid copper rules echo the sticky navigation's metalwork. */
@media (min-width: 701px) {
  .ink-flow-art > .flow-conversation-label::after {
    flex: none;
  }
  .flow-narration[data-narration="lines"] .flow-narration-title {
    font-size: clamp(36px, 3.5vw, 52px);
  }
}

/* Clarify the illustrated composer and echo the full-width navigation rule. */
.flow-input-note {
  position: absolute;
  left: 0;
  width: 25%;
  margin: 0;
  text-align: center;
  pointer-events: none;
  color: #c6b6cf;
  font:
    400 12px / 1.45 "Plus Jakarta Sans",
    sans-serif;
  z-index: 3;
}
@media (min-width: 701px) {
  .ink-flow-art > .flow-conversation-label {
    width: 27%;
  }
  .ink-flow-art > .flow-chat-label {
    left: -1%;
  }
  .ink-flow-art > .flow-conversation-label::after {
    width: 100%;
    max-width: none;
    height: 2px;
    opacity: 0.8;
    background: var(--lorbo-bronze-rule);
    box-shadow: var(--lorbo-bronze-rule-shadow);
  }
}

/* Editable serif labels sit on the clean heading areas of the parchment assets. */
.flow-manuscript-sheet {
  position: relative;
  height: 100%;
  width: auto;
  aspect-ratio: 1122 / 1402;
  max-width: 100%;
  container-type: inline-size;
  flex: none;
}
.flow-manuscripts .flow-manuscript-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}
.flow-manuscript-title {
  position: absolute;
  top: 17%;
  left: 7%;
  width: 86%;
  margin: 0;
  text-align: center;
  color: #4b301e;
  font:
    600 12cqw / 1.05 "Cormorant Garamond",
    Georgia,
    serif;
  pointer-events: none;
  text-shadow: none;
}
.flow-manuscript-chapter {
  position: absolute;
  top: 28.5%;
  left: 7%;
  width: 86%;
  margin: 0;
  text-align: center;
  color: #4b301e;
  font:
    600 7cqw / 1.15 "Cormorant Garamond",
    Georgia,
    serif;
  pointer-events: none;
  text-shadow: none;
}

/* Occasional single-star glints; keep the sky mostly still. */
.lorbo-star {
  animation: lorbo-star-twinkle var(--twinkle) ease-in-out infinite;
  animation-delay: var(--delay);
  animation-play-state: paused;
}
@keyframes lorbo-star-twinkle {
  0%,
  68%,
  100% {
    opacity: calc(var(--alpha) * 0.62);
  }
  78% {
    opacity: var(--alpha);
  }
  84% {
    opacity: calc(var(--alpha) * 0.4);
  }
  91% {
    opacity: calc(var(--alpha) * 0.7);
  }
}
.flow-night-motion {
  position: absolute;
  left: calc(50% - 50vw);
  top: -180px;
  width: 100vw;
  height: 190px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.flow-shooting-star {
  position: absolute;
  top: 12px;
  width: 125px;
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #c7c5ee 80%, #fff7e6);
  box-shadow: 5px 0 8px #e1d8f566;
  opacity: 0;
  transform-origin: right center;
}
@media (prefers-reduced-motion: reduce) {
  .flow-night-motion {
    display: none;
  }
}
