/* The paper is revealed at its natural width; only its two rollers travel. */
.scroll-page .handscroll {
  --unroll-duration: 980ms;
  --unroll-ease: cubic-bezier(.22,.68,.2,1);
  --mount: #c5b68e;
  --sheet: #f2ead5;
  --roller-dark: #574c38;
  --roller-mid: #9c8862;
  --roller-light: #c8b48a;
  padding: 0;
  margin-bottom: 52px;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  isolation: isolate;
}
.scroll-page .handscroll::before { display: none; }
.handscroll-leaf {
  position: relative;
  min-height: 360px;
  padding: 38px 64px 40px;
  border-block: 1px solid var(--edge);
  background:
    linear-gradient(90deg,#54482f1c,transparent 5%,transparent 95%,#54482f1c),
    repeating-linear-gradient(0deg,#8c754b05 0 1px,transparent 1px 4px),
    repeating-linear-gradient(90deg,#8c754b08 0 1px,transparent 1px 5px),
    var(--sheet);
  box-shadow: 0 18px 36px #0a252b26;
  animation: handscroll-unroll var(--unroll-duration) var(--unroll-ease) both;
}
.handscroll-leaf::before {
  content: '';
  position: absolute;
  inset: 0;
  border-inline: 25px solid var(--mount);
  opacity: .45;
  pointer-events: none;
}
.handscroll-leaf::after {
  content: '';
  position: absolute;
  inset: 10px 31px;
  border: 1px solid var(--edge);
  opacity: .65;
  pointer-events: none;
}
.handscroll-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  animation: handscroll-ink 760ms ease-out 120ms both;
}
.handscroll-roller {
  position: absolute;
  z-index: 2;
  top: -7px;
  bottom: -7px;
  width: 22px;
  border: 1px solid #52493166;
  border-radius: 5px;
  background: linear-gradient(90deg,var(--roller-dark),var(--roller-mid) 24%,var(--roller-light) 45%,var(--roller-mid) 64%,var(--roller-dark));
  box-shadow: 3px 5px 9px #0d201f36, inset 1px 0 #f3e7c34d;
  pointer-events: none;
}
.handscroll-roller::before,.handscroll-roller::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  height: 12px;
  border: 1px solid #4b433477;
  border-radius: 3px;
  background: linear-gradient(90deg,var(--roller-dark),var(--roller-light) 42%,var(--roller-mid) 66%,var(--roller-dark));
  box-shadow: inset 0 2px #e6d1a84d, 0 2px 4px #0d201f26;
}
.handscroll-roller::before { top: -5px; }
.handscroll-roller::after { bottom: -5px; }
.handscroll-roller-left {
  left: 0;
  transform: translateX(-50%);
  animation: handscroll-left var(--unroll-duration) var(--unroll-ease) both;
}
.handscroll-roller-right {
  right: 0;
  transform: translateX(50%);
  animation: handscroll-right var(--unroll-duration) var(--unroll-ease) both;
}
[data-theme=night] .handscroll {
  --sheet: #142e39;
  --mount: #5b7375;
  --roller-dark: #27383b;
  --roller-mid: #64726a;
  --roller-light: #acb3a0;
}
[data-theme=night] .handscroll-leaf { box-shadow: 0 20px 40px #030f1a55; }
.handscroll .section-top { padding-bottom: 22px; }
.handscroll .taxonomy { padding-block: 30px 12px; }
.handscroll .taxonomy a { box-shadow: none; }
.handscroll .contact-cards { padding-bottom: 0; }
.handscroll .visiting-cards { padding-bottom: 0; }
@keyframes handscroll-unroll {
  from { clip-path: inset(-20px 50% -55px); }
  to { clip-path: inset(-20px 0 -55px); }
}
@keyframes handscroll-left { from { left: 50%; } to { left: 0; } }
@keyframes handscroll-right { from { right: 50%; } to { right: 0; } }
@keyframes handscroll-ink { from { opacity: 0; } to { opacity: 1; } }
@media (max-width:800px) {
  .scroll-page .handscroll { --unroll-duration: 800ms; width: calc(100% - 48px); }
  .handscroll-leaf { padding: 30px 34px; }
  .handscroll-leaf::before { border-inline-width: 14px; }
  .handscroll-leaf::after { inset: 9px 19px; }
  .handscroll-roller { width: 18px; }
}
@media (max-width:480px) {
  .scroll-page .handscroll { width: calc(100% - 36px); }
  .handscroll-leaf { padding: 26px 23px 30px; }
  .handscroll-leaf::before { border-inline-width: 8px; }
  .handscroll-leaf::after { inset: 8px 12px; }
  .handscroll-roller { width: 14px; }
  .handscroll-roller::before,.handscroll-roller::after { height: 10px; left: -2px; right: -2px; }
  .handscroll .section-top h1 { font-size: 30px; }
  .handscroll .contact-card { padding: 20px 13px; gap: 10px; grid-template-columns: 30px minmax(0,1fr) 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .handscroll-leaf,.handscroll-content,.handscroll-roller { animation: none; }
}
@media print {
  .handscroll-roller,.handscroll-leaf::before,.handscroll-leaf::after { display: none; }
  .scroll-page .handscroll { width: 100%; margin: 0; }
  .handscroll-leaf { padding: 0; min-height: 0; border: 0; box-shadow: none; background: white; animation: none; }
  .handscroll-content { animation: none; }
}
