/* Assam's living canopy threads through the listening and life chapters. */
.site-foliage {
  position: absolute;
  z-index: 0;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  transform-origin: 50% 12%;
  filter: drop-shadow(0 20px 30px #07150d55)
}

.hero .topbar,.hero .hero-center,.hero .hero-bottom {
  position: relative;
  z-index: 2
}

.intro,.life,.giving-line,.places,.archive,.quiz-section {
  position: relative;
  isolation: isolate
}

.intro>.intro-layout,.intro>.fact-strip,.life>.life-opening,.life>.timeline-cues,.life>.life-journey,.giving-line>.giving-heading,.giving-line>.giving-story,.places>.feature-heading,.places>.place-shell,.archive>.archive-heading,.archive>.featured-collections,.archive>.archive-search,.archive>.track-list,.archive>.collection-grid,.quiz-section>.feature-heading,.quiz-section>.quiz-panel {
  position: relative;
  z-index: 1
}

.foliage-intro {
  top: 20px;
  right: -10%;
  width: min(26vw,340px);
  opacity: .23;
  transform: rotate(11deg)
}

.foliage-life {
  top: 5px;
  right: -12%;
  width: min(72vw,920px);
  opacity: .25;
  transform: rotate(-7deg)
}

.foliage-giving {
  top: 14%;
  right: -9%;
  width: min(31vw,420px);
  opacity: .31;
  transform: rotate(14deg)
}

.foliage-places {
  top: -24px;
  right: -10%;
  width: min(62vw,760px);
  opacity: .28;
  transform: rotate(9deg)
}

.foliage-archive {
  top: -86px;
  left: -14%;
  width: min(58vw,740px);
  opacity: .25;
  transform: rotate(-13deg)
}

.foliage-quiz {
  top: -85px;
  right: -9%;
  width: min(25vw,300px);
  opacity: .27;
  transform: rotate(-13deg)
}

@media(prefers-reduced-motion:no-preference) {
  .site-foliage {
    animation: canopySway 10s ease-in-out infinite alternate
  }
  .foliage-life,.foliage-archive {
    animation-delay: -4s
  }
  @keyframes canopySway {
    from {
      translate: 0 0
    }
    to {
      translate: 8px 8px
    }
  }
}

@media(max-width:760px) {
  .foliage-intro {
    display: none
  }
  .foliage-life {
    width: 105vw;
    right: -40%;
    top: 38px;
    opacity: .16
  }
  .foliage-giving {
    width: 190px;
    right: -75px;
    top: 24%;
    opacity: .23
  }
  .foliage-places {
    width: 100vw;
    right: -35%;
    opacity: .16
  }
  .foliage-archive {
    width: 100vw;
    left: -40%;
    top: -55px;
    opacity: .14
  }
  .foliage-quiz {
    width: 200px;
    right: -65px;
    top: -45px;
    opacity: .19
  }
}

@media(prefers-reduced-motion:reduce) {
  .site-foliage {
    animation: none
  }
}

/* A tactile cassette deck with a live YouTube player beneath the tape. */
.dock {
  width: min(430px,calc(100vw - 30px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 15px;
  border: 1px solid #bf8358;
  border-radius: 23px;
  background: linear-gradient(140deg,#44251edb 0%,#251d19fa 27%,#151714fc 100%);
  box-shadow: 0 0 0 3px #351e19,0 20px 65px #000c,0 4px 38px #8d402b65;
  scrollbar-width: thin;
  scrollbar-color: #ad7357 transparent;
  backdrop-filter: blur(20px)
}

.dock[hidden] {
  display: none
}

.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px
}

.deck-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0
}

.deck-brand strong {
  font: 700 12px/1.15 'DM Sans',sans-serif;
  letter-spacing: .18em;
  color: #f5cf97
}

.deck-brand small {
  display: block;
  margin-top: 2px;
  color: #c6a993;
  font-size: 11px
}

.deck-light {
  display: block;
  flex: none;
  width: 11px;
  height: 11px;
  border: 1px solid #4f3827;
  border-radius: 50%;
  background: #71604b;
  box-shadow: 0 0 0 3px #2b1f18,inset 0 0 6px #1d2118;
  transition: background .3s,box-shadow .3s
}

.dock.is-playing .deck-light {
  background: #70d483;
  box-shadow: 0 0 0 3px #2b1f18,0 0 16px #70d483
}

.dock-head .close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  width: auto;
  height: auto;
  padding: 6px 10px;
  border: 1px solid #cba2717f;
  border-radius: 6px;
  background: #564034;
  color: #fbe1b7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase
}

.dock-head .close:hover {
  background: #78503b
}

.cassette-deck {
  position: relative;
  max-width: 100%;
  margin: 0 auto 7px;
  isolation: isolate
}

.cassette-deck img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2/1;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px #000c)
}

.cassette-label {
  position: absolute;
  top: 19%;
  left: 16%;
  right: 16%;
  max-height: 18%;
  overflow: hidden;
  text-align: center;
  color: #432218;
  transform: rotate(-.25deg)
}

.cassette-label strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 clamp(12px,1.5vw,15px)/1.2 'DM Sans',sans-serif;
  letter-spacing: .02em;
  color: #452118;
  text-shadow: 0 1px #fff9
}

.cassette-label small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.2;
  color: #79483a
}

.cassette-transport {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid #a3795373;
  border-radius: 8px;
  background: linear-gradient(180deg,#3d3730,#181916 85%);
  box-shadow: inset 0 2px 5px #0008,0 6px 12px #090a08a8
}

.cassette-transport button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  min-width: 71px;
  padding: 5px 11px;
  border: 1px solid #bca7838e;
  border-bottom-color: #442b22;
  border-radius: 6px;
  background: linear-gradient(#d3ba91,#9e795b);
  color: #251b16;
  font: 700 12px/1 'DM Sans',sans-serif;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #563729,inset 0 1px #fff7;
  cursor: pointer
}

.cassette-transport button:hover:not(:disabled) {
  background: linear-gradient(#f5d9a6,#c19770)
}

.cassette-transport button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #563729
}

.cassette-transport button:disabled {
  opacity: .58;
  cursor: default
}

.cassette-transport button[hidden] {
  display: none
}

.cassette-transport #cassettePlay {
  min-width: 90px
}

.transport-meter {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  flex: 1;
  height: 26px;
  overflow: hidden
}

.transport-meter i {
  display: block;
  width: 3px;
  height: 6px;
  flex: none;
  border-radius: 2px;
  background: #e6a85f;
  opacity: .55
}

.transport-meter i:nth-child(3n) {
  height: 17px
}

.transport-meter i:nth-child(3n+1) {
  height: 11px
}

.dock.is-playing .transport-meter i {
  opacity: 1;
  animation: tapePulse .8s ease-in-out infinite alternate
}

.dock.is-playing .transport-meter i:nth-child(3n) {
  animation-delay: -.3s
}

.dock.is-playing .transport-meter i:nth-child(3n+1) {
  animation-delay: -.6s
}

@keyframes tapePulse {
  from {
    transform: scaleY(.3)
  }
  to {
    transform: scaleY(1)
  }
}

.dock-view-toggle {
  margin: 11px 0 7px;
  border: 1px solid #a17b5975;
  border-radius: 8px;
  background: #131713
}

.dock-view-toggle button {
  min-height: 33px;
  border-radius: 6px;
  font-size: 12px
}

.dock-view-toggle button[aria-pressed=true] {
  background: #863a2a;
  color: #fff2de
}

.dock .player-note {
  margin: 0 1px 8px;
  color: #ceb89d;
  font-size: 12px
}

.dock .video {
  min-width: 200px;
  min-height: 200px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid #b6885b;
  border-radius: 8px;
  background: #0a0c0c;
  box-shadow: inset 0 0 0 2px #211d16,0 6px 15px #0008
}

.dock .video iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0
}

.dock-link {
  margin-top: 9px;
  color: #f4c58b;
  font-size: 12px
}

.dock.expanded {
  width: min(800px,calc(100vw - 40px))
}

.dock.expanded .cassette-deck {
  max-width: 460px
}

.dock.expanded .video {
  min-height: 270px
}

.dock.expanded .video iframe {
  min-height: 270px
}

@media(max-width:600px) {
  .dock {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: calc(100dvh - 16px);
    padding: 10px 12px 12px;
    border-radius: 17px
  }
  .dock-head {
    margin-bottom: 2px
  }
  .cassette-deck {
    width: min(290px,100%);
    margin-bottom: 1px
  }
  .cassette-label strong {
    font-size: 12px
  }
  .cassette-label small {
    font-size: 9px
  }
  .cassette-transport {
    padding: 6px;
    gap: 7px
  }
  .cassette-transport button {
    min-height: 32px;
    min-width: 65px;
    font-size: 11px
  }
  .transport-meter {
    gap: 2px
  }
  .dock-view-toggle {
    margin: 8px 0 5px
  }
  .dock .player-note {
    margin-bottom: 5px
  }
  .dock .video {
    height: 200px;
    min-height: 200px;
    aspect-ratio: auto
  }
  .dock.expanded {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    padding: 15px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center
  }
  .dock.expanded .cassette-deck {
    display: none
  }
  .dock.expanded .video {
    height: min(58svh,520px);
    min-height: 200px;
    flex: none
  }
  .dock.expanded .video iframe {
    height: 100%
  }
  body:has(.dock:not([hidden])) .archive-chat-launcher {
    top: 8px;
    bottom: auto;
    left: 8px
  }
  body:has(.dock.expanded:not([hidden])) .archive-chat-launcher {
    display: none
  }
}

@media(max-width:380px) {
  .cassette-deck {
    width: min(242px,100%)
  }
  .deck-brand strong {
    font-size: 10px
  }
  .deck-brand small {
    font-size: 10px
  }
  .transport-meter i:nth-child(n+7) {
    display: none
  }
}

@media(prefers-reduced-motion:reduce) {
  .dock.is-playing .transport-meter i {
    animation: none
  }
}
