/* splitlobby: the bottom of a thermal receipt in a quiet cream lobby. Ink is
   the only colour, and brass only on the bell. */
[data-signoff='splitlobby'] {
  --sl-ink: #121212;
  --sl-muted: #7e7e7d;
  --sl-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --b-height: clamp(220px, 24vw, 350px);
  --b-height-m: 210px;
  /* clip, not hidden, so focusing the bell can never scroll the band. */
  overflow: clip;
}
[data-signoff='splitlobby'] .story-signoff-scene {
  -webkit-mask-image: linear-gradient(
    transparent,
    rgb(0 0 0 / 0.04) 12%,
    rgb(0 0 0 / 0.14) 24%,
    rgb(0 0 0 / 0.32) 36%,
    rgb(0 0 0 / 0.55) 48%,
    rgb(0 0 0 / 0.76) 60%,
    rgb(0 0 0 / 0.9) 72%,
    rgb(0 0 0 / 0.97) 84%,
    #000
  );
  mask-image: linear-gradient(
    transparent,
    rgb(0 0 0 / 0.04) 12%,
    rgb(0 0 0 / 0.14) 24%,
    rgb(0 0 0 / 0.32) 36%,
    rgb(0 0 0 / 0.55) 48%,
    rgb(0 0 0 / 0.76) 60%,
    rgb(0 0 0 / 0.9) 72%,
    rgb(0 0 0 / 0.97) 84%,
    #000
  );
}
.dark [data-signoff='splitlobby'] {
  --sl-ink: #f6f3ee;
  --sl-muted: #8a8580;
}

[data-signoff='splitlobby'] .story-signoff-scene {
  background:
    repeating-linear-gradient(
      2deg,
      transparent 0 18px,
      rgb(91 73 50 / 0.018) 19px
    ),
    linear-gradient(180deg, #fbfaf9, #f3efe9);
}
.dark [data-signoff='splitlobby'] .story-signoff-scene {
  background:
    radial-gradient(
      42% 70% at 35% 112%,
      rgb(201 138 27 / 0.16),
      transparent 70%
    ),
    linear-gradient(180deg, #18181b, #1b1916);
}

/* The receipt's last printed lines, centred on the band (the wordmark spans
   gutter to gutter, so that is also the wordmark's centre) and standing a
   fixed gap above the bell, so the two never touch at any width. */
[data-signoff='splitlobby'] .sl-wit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + clamp(16px, 2.4cqw, 36px));
  text-align: center;
  font: 500 clamp(9.5px, 0.8cqw, 11px) / 1.7 var(--sl-mono);
  letter-spacing: 0.1em;
  color: var(--sl-muted);
  white-space: nowrap;
}
[data-signoff='splitlobby'] .sl-wit > span {
  display: inline-block;
  animation: sl-print 0.5s linear both;
}
[data-signoff='splitlobby'] .sl-wit > span > span {
  display: block;
}
/* A thermal printer burns one dot row at a time while the paper feeds, so a
   line appears top to bottom at a constant rate. */
@keyframes sl-print {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0);
  }
}

[data-signoff='splitlobby'] .sl-name {
  translate: 0 23%;
}
[data-signoff='splitlobby'] .sl-mark {
  position: relative;
  display: block;
  width: 100%;
}
[data-signoff='splitlobby'] .sl-mark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
[data-signoff='splitlobby'] .sl-ink {
  fill: var(--sl-ink);
}
[data-signoff='splitlobby'] .sl-bell {
  fill: url(#sl-brass);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
[data-signoff='splitlobby'] .sl-bell-knob {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

[data-signoff='splitlobby'] .sl-bell-hit {
  position: absolute;
  width: 6%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
[data-signoff='splitlobby'] .sl-bell-hit:focus-visible {
  outline: 2px solid #c98a1b;
  outline-offset: 2px;
}
[data-signoff='splitlobby']
  .sl-name:not([data-ring]):has(.sl-bell-hit:hover)
  .sl-bell {
  animation: sl-lean 0.6s ease-in-out both;
}

/* A struck desk bell: the plunger dips and the dome rings. Two identical
   keyframes so every strike restarts the animation. */
[data-signoff='splitlobby'] .sl-name[data-ring='0'] .sl-bell {
  animation: sl-ring-a 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
[data-signoff='splitlobby'] .sl-name[data-ring='1'] .sl-bell {
  animation: sl-ring-b 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
[data-signoff='splitlobby'] .sl-name[data-ring='0'] .sl-bell-knob,
[data-signoff='splitlobby'] .sl-name[data-ring='1'] .sl-bell-knob {
  animation: sl-press 0.25s ease-out;
}
/* Past the limit the bell only gives a dull nudge. */
[data-signoff='splitlobby'] .sl-name[data-busy][data-ring='0'] .sl-bell {
  animation: sl-thud-a 0.3s ease-out both;
}
[data-signoff='splitlobby'] .sl-name[data-busy][data-ring='1'] .sl-bell {
  animation: sl-thud-b 0.3s ease-out both;
}

@keyframes sl-lean {
  50% {
    rotate: -4deg;
  }
}
@keyframes sl-press {
  50% {
    scale: 1 0.55;
  }
}
@keyframes sl-ring-a {
  0% {
    rotate: 0deg;
  }
  12% {
    rotate: 12deg;
  }
  30% {
    rotate: -9deg;
  }
  48% {
    rotate: 6deg;
  }
  66% {
    rotate: -3deg;
  }
  84% {
    rotate: 1deg;
  }
  100% {
    rotate: 0deg;
  }
}
@keyframes sl-ring-b {
  0% {
    rotate: 0deg;
  }
  12% {
    rotate: 12deg;
  }
  30% {
    rotate: -9deg;
  }
  48% {
    rotate: 6deg;
  }
  66% {
    rotate: -3deg;
  }
  84% {
    rotate: 1deg;
  }
  100% {
    rotate: 0deg;
  }
}
@keyframes sl-thud-a {
  40% {
    translate: 0 1.5%;
  }
}
@keyframes sl-thud-b {
  40% {
    translate: 0 1.5%;
  }
}

@media (max-width: 640px) {
  [data-signoff='splitlobby'] .sl-wit {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  [data-signoff='splitlobby'] .sl-bell-hit {
    width: 12%;
  }
}
