/* The homepage's first screen (index.html #hero): the poster headline and Starling's box on the left, the river of
   requests on the right (home-studio.js drives both; starling-river.js and starling-cards.js the river). On a phone the
   headline, river and composer are stacked. */

.home {
  --rv-height: clamp(540px, calc(100svh - 96px), 780px);
}
.hm-hero {
  --rv-height: clamp(520px, calc(100svh - var(--nav-h, 72px) - 24px), 780px);
  min-height: calc(100svh - var(--nav-h, 72px));
  min-height: calc(100dvh - var(--nav-h, 72px));
  padding-block: 12px;
  overflow: clip;
}
.hm-hero-in {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.hm-hero .hm-poster {
  font-size: min(var(--hm-poster), 72px);
}
.hm-intake {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: clamp(28px, 4.4svh, 44px);
}
.hm-hero-ask-group {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 560px);
}
.hm-hero-starters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-2);
}
.hm-hero-starter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 12px 4px 6px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--ring);
  color: var(--ink);
  font: 500 13px / 1.2 var(--sans);
  cursor: pointer;
  transition:
    background-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    transform 0.35s var(--ease-spring);
}
.hm-hero-starter::before {
  content: "";
  position: absolute;
  inset: calc(var(--space-3) / -2) calc(var(--space-2) / -2);
  border-radius: 999px;
}
.hm-hero-starter-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 14, 18, 0.055);
  color: var(--ink-soft);
  transition:
    background-color 0.15s var(--ease),
    color 0.15s var(--ease);
}
.hm-hero-starter-icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 1.75;
}
.hm-hero-starter:hover {
  background: var(--layer-1);
}
.hm-hero-starter:hover .hm-hero-starter-icon {
  background: var(--accent-tint);
  color: var(--accent);
}
.hm-hero-starter:active {
  transform: scale(0.97);
}
.hm-hero-starter:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

@media (max-width: 600px), (pointer: coarse) {
  .hm-hero-starter {
    min-height: 44px;
  }
  .hm-hero-starter:active {
    transform: none;
  }
}

/* ── The river ────────────────────────────────────────────────────────────────────────────────────────────────── */
/* The river column (sized for starling-river.js measurement on desktop & phone) */
.rv {
  --rv-w: clamp(300px, 31vw, 460px);
  --rv-gap: 12%;
  position: relative;
  height: var(--rv-height);
  min-width: 0;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.rv.is-ready {
  contain: layout paint;
  overflow: clip;
  isolation: isolate;
}
.rv:focus-visible {
  outline-offset: -2px;
}
@media (hover: hover) and (pointer: fine) {
  .rv.is-ready {
    cursor: grab;
  }
  .rv.is-ready.is-dragging {
    cursor: grabbing;
  }
}
.rv-river {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.rv-line {
  fill: none;
  stroke: rgba(15, 14, 18, 0.22);
  stroke-width: 1.15;
  stroke-linecap: round;
}
.rv-water {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rv-note {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  fill: var(--accent);
  opacity: 0;
}
.rv-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
html.js .rv .rv-list,
.rv.is-ready .rv-list {
  position: absolute;
  z-index: 1;
  inset: 0;
}
.rv-item {
  position: relative;
  width: var(--rv-w);
}
.rv.is-ready .rv-item {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 50% 50%;
}
.rv.is-ready .rv-item.is-on {
  z-index: 1;
}
/* The opening belongs to the first example. Export cards enter the river on their own turn. */
html.js .home #hero .rv:not(.has-advanced) .rv-item:not(:first-child),
.home #hero .rv.is-ready .rv-item[data-card="files"]:not(.has-visited) {
  visibility: hidden;
}
/* Before enhancement the published examples are a readable list, with real audio and download links. */
html:not(.js) .rv:not(.is-ready) {
  height: auto;
  margin-inline: 0;
  user-select: text;
}
html:not(.js) .rv:not(.is-ready) .rv-list {
  display: grid;
  gap: var(--space-7);
}
html:not(.js) .rv:not(.is-ready) .rv-item {
  width: min(100%, var(--rv-w));
  margin-inline: auto;
}
html:not(.js) .rv:not(.is-ready) .rv-say {
  position: static;
  margin-bottom: var(--space-3);
}
/* The first example is already visible while the river is prepared after the first frame (home-studio.js). */
html.js .rv:not(.is-ready) {
  overflow: clip;
}
html.js .rv:not(.is-ready) .rv-list {
  visibility: hidden;
}
html.js .rv:not(.is-ready) .rv-item:first-child {
  position: absolute;
  top: 50%;
  left: 50%;
  visibility: visible;
  transform: translate(-50%, -50%);
}
@media (max-width: 519.98px) {
  html.js .rv:not(.is-ready) .rv-item:first-child {
    top: calc(50% + 24px);
  }
}
/* A card is what was brought over what Starling made of it, each sheet whole and in its own picture's shape (--in and
   --out, from the pictures; home_examples.py), neither covering the other: the sparks carry the notes down. */
.rv-pair {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 8px;
}
.rv-in,
.rv-out,
.rv-file {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--ring);
}
.rv-in {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: calc(var(--inw-k) * 100%);
  overflow: hidden;
}
.rv-in > :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.rv-in-photo > img {
  object-position: 50% 8%;
}
.rv-in-video video {
  transform: scale(1.55);
  transform-origin: 0 20%;
}
.rv-in-score {
  padding: 10px 12px;
}
.rv-in-score > :is(img, svg) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--in);
  object-fit: contain;
}
.rv-out {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: 14px 18px;
}
.rv-out > :is(img, svg) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--out);
  object-fit: contain;
}
/* A long result shows its first system whole. */
.rv-top > img {
  object-fit: cover;
  object-position: 50% 0;
}
#hero .rv-item[data-rv-still-hidden] :is(.rv-in, .rv-out) > img {
  visibility: hidden;
}
.rv.is-ready .rv-out > img {
  transition: opacity 0.4s var(--ease-settle);
}
@media (prefers-reduced-motion: no-preference) {
  html.js .rv:not(.is-ready) .rv-item:first-child .rv-out > img {
    opacity: 0;
  }
  html.js #hero .rv-item:first-child .rv-out:not(:has(> svg.rv-score)) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1296 368' preserveAspectRatio='none'%3E%3Cg stroke='rgba(15,14,18,0.2)' stroke-width='1.5' fill='none'%3E%3Cpath d='M0 54h1296M0 72h1296M0 90h1296M0 108h1296M0 126h1296M0 234h1296M0 252h1296M0 270h1296M0 288h1296M0 306h1296'/%3E%3Cpath d='M1.5 54v252M1294.5 54v252' stroke-width='2.5'/%3E%3C/g%3E%3C/svg%3E");
    background-origin: content-box;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 100% 100%;
  }
}
.rv.is-ready .rv-item:not(.is-live, .is-done) .rv-out > img {
  opacity: 0;
  transition: none;
}
/* A tall input (the guitar's chord page) or a tall result (the class's three parts) gives the input reasonable width. */
.rv-item {
  --inw-k: 0.62;
}
.rv-item[data-card="guitar"] {
  --inw-k: 0.56;
}
.rv-tall {
  --inw-k: 0.56;
}
.rv-tall .rv-out {
  width: 92%;
  justify-self: end;
}
.rv-item[data-card="jianpu"] .rv-out {
  padding-block: var(--space-2);
}
/* Until a card's work is set up, its result is the page as published: the new key alone, the Moonlight page still. */
.rv-out > img.rv-was,
.rv-swarm:not(:empty) ~ .rv-swarm-still {
  visibility: hidden;
}
.rv-solo {
  grid-template-columns: minmax(0, 1fr);
}
.rv-solo .rv-out {
  margin: 0;
}
.rv-swarm-out {
  aspect-ratio: 1000 / 538;
  background: var(--score-paper);
}
.rv-swarm {
  --film-ink: #0f0e12;
  --film-live: #e8501a;
  --film-bad: #c42b12;
  --film-note: #2a292e;
  --film-row: #f7f7f6;
  --film-row-dark: #efefed;
  --film-rule: #e4e4e1;
  --film-bar: #c9c9c6;
  position: relative;
  overflow: hidden;
}
.rv-swarm .film-paper {
  border-radius: 0;
  box-shadow: none;
}
.rv-swarm .film-roll {
  border-radius: var(--radius-sm);
}
.rv-swarm .film-cur svg {
  scale: var(--grow, 1);
}
.rv-swarm .film-cur span {
  transform-origin: -15px -19px;
  scale: var(--grow, 1);
}
.rv-score :is(.chord, .note, .rest, .mRest, .tabGrp, .harm, .dynam, .keyAccid),
.rv-score.jianpu > g {
  transform-box: fill-box;
  transform-origin: center;
}
.engraved.rv-score .note {
  transition: none;
}
.rv-fx {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--accent);
  pointer-events: none;
}
.rv-in-wave {
  display: grid;
  aspect-ratio: var(--in);
  padding: 6% 6%;
}
.rv-wave-box {
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  aspect-ratio: var(--in);
}
.rv-in-wave svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rv-wave {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.rv-wave-heard {
  stroke: var(--accent);
  clip-path: inset(-30% calc((1 - var(--p, 0)) * 100%) -30% 0);
}
.rv-head {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: calc(var(--p, 0) * 100%);
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
}
.rv-in-wave.is-heard .rv-head {
  opacity: 1;
}
.rv-scan {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 22%;
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(transparent, var(--accent-tint) 40%, rgba(232, 80, 26, 0.22));
  transform: translateY(calc(var(--p, 0) * 454.5% - 100%));
  opacity: 0;
  pointer-events: none;
}
.rv-pen {
  position: absolute;
  z-index: 3;
  top: 0;
  left: -1px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.rv-cover {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: none;
  overflow: hidden;
  background-color: inherit;
  pointer-events: none;
  will-change: transform;
}
.rv-cover > svg {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.rv-heard {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  width: calc(var(--p, 0) * 100%);
  height: 3px;
  background: var(--accent);
  pointer-events: none;
}
.rv-band {
  position: absolute;
  z-index: 1;
  left: 4%;
  width: 92%;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  border-radius: var(--radius-xs);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px rgba(232, 80, 26, 0.3);
  opacity: 0;
  pointer-events: none;
}
.rv-files {
  position: relative;
  z-index: 5;
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  width: 100%;
  background: var(--paper);
}
.rv-file {
  --rv-document-width: 32px;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1);
  min-height: 52px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--ring);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: var(--lh-heading);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s;
}
.rv-file::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--space-1));
}
.rv-file:hover {
  background: var(--layer-1);
}
.rv-file > * {
  opacity: var(--on, 1);
}
.rv-file .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.rv-file.is-ready .icon {
  animation: rv-nod 0.7s var(--ease-spring);
}
@keyframes rv-nod {
  40% {
    transform: translateY(3px);
  }
}
.rv-pdf-page,
.rv-xml-page {
  display: block;
  box-sizing: border-box;
  width: var(--rv-document-width);
  aspect-ratio: 210 / 297;
  padding: 4px;
  border-radius: 2px;
  background-color: var(--white);
  color: var(--line-strong);
  box-shadow: 0 0 0 1px currentColor;
}
.rv-pdf-page {
  background: url("/assets/river/jesu-g.svg") 50% 0 / 100% 25% repeat-y content-box var(--white);
}
.rv-pdf-page.is-blank {
  background-image: none;
}
.rv-xml-symbol {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
@container (max-width: 310px) {
  .rv-files .rv-file {
    --rv-document-width: 24px;
    padding-inline: var(--space-2);
    font-size: 13px;
  }
  .rv-file .icon {
    width: 16px;
  }
}
.rv-ghost {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  box-sizing: border-box;
  height: auto;
  padding: 3%;
  border-radius: var(--radius-xs);
  background: var(--white);
  box-shadow: 0 10px 24px -10px rgba(15, 14, 18, 0.35);
  opacity: 0;
  pointer-events: none;
}
/* The traveling PDF copy slips behind the full input score. */
.hm-hero .rv-ghost {
  z-index: 0;
}
.rv-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  width: fit-content;
  margin: var(--space-3) 2px 0;
  background: transparent;
  text-shadow:
    0 0 10px var(--paper),
    0 0 18px var(--paper),
    0 1px 0 var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .rv-foot {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: none;
}
.rv-foot > * {
  padding: 0 2px;
  background: transparent;
}
.rv-credit {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: break-word;
}
.rv-credit a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.rv-credit a:hover {
  color: var(--ink);
}
.rv-say {
  position: absolute;
  z-index: 3;
  /* Wholly above its card, a fixed gap from it: it never covers the card's music (the river spaces its cards for it). */
  bottom: calc(100% + var(--space-3));
  left: 0;
  width: max-content;
  max-width: calc(100% - var(--space-4));
  margin: 0;
  padding: 8px 13px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  background: var(--lg-glass);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-glass-shadow);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--ink);
  text-wrap: pretty;
}
.home .rv-say {
  background: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  font-weight: 560;
  color: var(--white);
}
.rv-say q {
  quotes: none;
}
.rv.is-ready .rv-say {
  visibility: hidden;
  pointer-events: none;
}
.rv.is-ready .rv-item.is-on .rv-say {
  visibility: visible;
}
@media (prefers-reduced-motion: no-preference) {
  html.js .hm-hero .rv:not(.is-ready) .rv-item:first-child:not(.is-inking) .rv-say {
    opacity: 0;
  }
  .home .rv-item:is(.is-on, .is-inking) .rv-say {
    transform-origin: 12px 100%;
    animation: rv-request-in 0.38s var(--ease-spring) both;
  }
  .rv-item .rv-say [data-g] {
    display: inline-block;
    white-space: pre-wrap;
  }
  .rv-item:is(.is-on, .is-inking) .rv-say [data-g] {
    animation: st-ink-blur 0.12s ease-out var(--g-delay, 0ms) both;
  }
}
@keyframes rv-request-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rv-item .rv-say [data-g] {
    animation: none;
  }
}
/* Starling stands on the result's top edge, beside what was brought. */
.rv-item .st-perch {
  top: calc(var(--rv-w) * var(--inw-k) / var(--in, 4) + 20px + 8px - var(--rv-w) * 0.18 * 640 / 541 + 3px);
  right: 4%;
  width: calc(var(--rv-w) * 0.18);
}
.rv-item[data-card="recording"] .st-perch {
  top: calc(var(--rv-w) * var(--inw-k) / var(--in, 4) + 8px - var(--rv-w) * 0.18 * 640 / 541 + 3px);
  right: calc(44px + 2 * var(--space-2));
}
.rv-item:not(.is-on) .st-perch > img {
  visibility: hidden;
}
.rv-play {
  position: absolute;
  z-index: 5;
  right: var(--space-2);
  top: var(--space-2);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    var(--ring),
    0 8px 18px -8px rgba(15, 14, 18, 0.35);
  transition:
    background-color 0.2s,
    transform 0.4s var(--ease-spring),
    opacity 0.3s;
}
.rv-play::before {
  content: "";
  position: absolute;
  inset: var(--rv-play-reach, -4px);
  border-radius: 50%;
}
.rv-play .icon {
  width: 16px;
  height: 16px;
}
.rv-play:hover {
  transform: scale(1.06);
}
.rv-play[aria-pressed="true"] {
  background: var(--accent);
  color: var(--white);
}
.rv.is-ready .rv-item:not(.is-on) .rv-play {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

/* The one living Starling bird flying across sections */
.st-perch {
  position: absolute;
  aspect-ratio: 541 / 640;
  pointer-events: none;
}
.st-perch img {
  display: block;
  width: 100%;
  height: 100%;
}
.has-bird .st-perch > img {
  visibility: hidden;
}
/* Starling stands in the perch it lands on (home-studio.js), so it rides the request as the river moves it. */
.hm-bird {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  pointer-events: none;
  transform-origin: 0 0;
}
.hm-bird.is-on {
  visibility: visible;
}
.hm-bird img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}
.hm-bird.is-on img.is-shown {
  visibility: visible;
}
/* ── Narrow windows and phones ───────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hm-hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }
  .hm-hero {
    align-content: start;
  }
  .rv {
    --rv-w: clamp(260px, 64vw, 400px);
    height: clamp(300px, 100svh - 560px, 460px);
    margin-inline: calc(-1 * var(--gutter));
  }
}
/* Use the viewport with the browser bars open to keep the complete composer and score in view on phones. */
@media (max-width: 759.98px) {
  .hm-hero {
    --hero-trim: clamp(0px, 768px - 100svh, 12px);
    --hero-space: max(var(--space-2), var(--space-4) - var(--hero-trim));
    --hero-shortening: clamp(0px, 714px - 100svh, 40px);
    --hero-river-floor: calc(448px - 2 * var(--hero-trim) - var(--hero-shortening));
    align-content: stretch;
    min-height: calc(100svh - var(--nav-h, 72px));
    min-height: calc(100dvh - var(--nav-h, 72px));
    padding-block: var(--hero-space);
  }
  .hm-hero-in {
    grid-template-rows: auto minmax(var(--hero-river-floor), 1fr) auto auto;
    gap: calc(var(--hero-space) - clamp(0px, 674px - 100svh, var(--space-1)));
  }
  .hm-hero .hm-intake {
    display: contents;
  }
  .hm-hero .hm-poster {
    font-size: min(var(--hm-poster), 44px - min(2px, var(--hero-trim)));
    order: 0;
  }
  .hm-hero .rv {
    --rv-w: min(84vw, 320px - var(--hero-trim));
    order: 1;
    height: 100%;
    margin-inline: calc(-1 * var(--gutter));
  }
  .hm-hero .rv-item:is([data-card="easier"], [data-card="hands"]) {
    --inw-k: 0.73;
  }
  .hm-hero .rv-item[data-card="guitar"],
  .hm-hero .rv-tall {
    --inw-k: 0.54;
  }
  .hm-hero .rv-say {
    padding-block: max(4px, 8px - var(--hero-trim) / 3);
  }
  /* Fit the taller guitar pair in the shorter river by taking room out of its paper margins. */
  .hm-hero .rv-item[data-card="guitar"] {
    --rv-source-padding: max(var(--space-1), 10px - var(--hero-shortening));
    --rv-pair-gap: max(var(--space-1), var(--space-2) - var(--hero-shortening));
  }
  .hm-hero .rv-item[data-card="guitar"] .rv-say {
    bottom: calc(100% + max(var(--space-2), var(--space-3) - var(--hero-shortening)));
  }
  .hm-hero .rv-item[data-card="guitar"] .rv-pair {
    gap: var(--rv-pair-gap);
  }
  .hm-hero .rv-item[data-card="guitar"] .rv-in-score {
    padding-block: var(--rv-source-padding);
  }
  .hm-hero .rv-item[data-card="guitar"] .st-perch {
    margin-top: calc(2 * var(--rv-source-padding) - 20px + var(--rv-pair-gap) - var(--space-2));
  }
  .hm-hero .rv-item[data-card="guitar"] .rv-out {
    padding-block: max(var(--space-1), 14px - var(--hero-shortening));
  }
  .hm-hero .rv-item[data-card="guitar"] .rv-foot {
    margin-top: max(var(--space-1), var(--space-2) - var(--hero-shortening));
  }
  .hm-hero .hm-hero-ask-group {
    display: contents;
  }
  .hm-hero .hm-hero-starters {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
  }
  .hm-hero .hm-hero-starter {
    justify-content: center;
    gap: var(--space-1);
    min-height: 44px;
    padding: 2px 4px;
    font-size: 12px;
    line-height: 1.15;
    text-align: start;
  }
  .hm-hero .hm-hero-starter::before {
    inset: 0 -4px;
    border-radius: 0;
  }
  .hm-hero .hm-hero-starter-icon {
    width: 20px;
    height: 20px;
  }
  .hm-hero .hc-ask {
    order: 2;
    width: 100%;
  }
  .hm-hero .hc-box {
    padding-block: max(10px, 12px - var(--hero-trim)) max(8px, 10px - var(--hero-trim));
  }
  .hm-hero .hc-input {
    min-height: max(44px, 50px - var(--hero-trim));
  }
  .hm-hero .hc-foot {
    margin-top: max(6px, 10px - var(--hero-trim));
  }
  html:not(.js) .hm-hero-in {
    grid-template-rows: auto auto auto;
  }
}

@media (max-width: 380px) {
  .hm-hero .hm-poster {
    font-size: min(var(--hm-poster), 11vw);
  }
  :root:lang(zh) .hm-hero .hm-poster {
    font-size: min(var(--hm-poster), 9vw);
  }
}

/* A short view with the browser bars open keeps both the example and the composer above the fold. */
@media (max-width: 519.98px) and (max-height: 666px) {
  .js .hm-hero {
    --hero-space: var(--space-1);
    --hero-river-floor: 298px;
    padding-bottom: var(--hero-space);
  }
  .js .hm-hero-in {
    grid-template-rows: auto minmax(var(--hero-river-floor), 1fr) auto;
    gap: var(--space-1);
  }
  .js .hm-hero .hm-hero-starters {
    display: none;
  }
  .js .hm-hero .hm-poster {
    font-size: min(var(--hm-poster), 10vw, 38px);
  }
  :root.js:lang(zh) .hm-hero .hm-poster {
    font-size: min(var(--hm-poster), 9vw, 35px);
  }
  .js .hm-hero .rv {
    --rv-card-inset: 6px;
  }
  .js .hm-hero .rv-pair {
    gap: var(--space-1);
  }
  .js .hm-hero .rv-in-score,
  .js .hm-hero .rv-out {
    padding-block: 6px;
  }
  .js .hm-hero .rv-foot {
    gap: 0;
    margin-top: var(--space-1);
  }
  .js .hm-hero .rv-item:not([data-card="guitar"]) .st-perch {
    margin-top: -12px;
  }
  .js .hm-hero .rv-item[data-card="recording"] .st-perch {
    margin-top: -4px;
  }
  .js .hm-hero .rv-item[data-card="guitar"] .st-perch {
    right: calc(44px + 2 * var(--space-2));
  }
  .js .hm-hero .hc-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: var(--space-2);
    min-height: 60px;
    padding: var(--space-2) 10px var(--space-2) 16px;
  }
  .js .hm-hero .hc-input {
    margin: 0;
    line-height: 20px;
  }
  .js .hm-hero .hc-foot {
    margin: 0;
  }
  .js .hm-hero .hc-attach {
    margin: 0;
    padding-inline: 10px;
    white-space: nowrap;
  }
  .js .hm-hero .hc-example {
    display: none;
  }
}

@media (max-width: 760px) {
  .rv-say {
    padding: 8px 12px;
    font-size: 14px;
  }
  .rv-foot {
    margin-top: var(--space-2);
    font-size: 13px;
  }
  .rv-credit a {
    position: relative;
  }
  .rv-credit a::before {
    content: "";
    position: absolute;
    /* Leave room for a finger even as the river scales a card. */
    inset: -12px -9px;
  }
  .rv-play::before {
    inset: -10px;
    border-radius: 0;
  }
  .rv.is-ready .rv-item:not(.is-on) .rv-play {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-hero-starter,
  .hm-hero-starter-icon,
  .rv.is-ready :is(.rv-say, .rv-play, .rv-out > img) {
    transition: none;
  }
  .hm-hero-starter:active {
    transform: none;
  }
}

@media (forced-colors: active) {
  :is(.hm-hero-starter, .rv):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
