/* Film chapter, remembrance, and the sourced archive guide. */
.reading-progress {
  position: fixed;
  z-index: 55;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: transparent
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg,#f8d08c,#ad3426,#f5be79);
  box-shadow: 0 0 12px #e67c3a77
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0
}

.cinema {
  margin: 108px 0 118px;
  position: relative;
  padding: 55px 0 64px;
  border-top: 1px solid #efce9a46;
  border-bottom: 1px solid #efce9a46;
  isolation: isolate
}

.cinema:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px calc((min(100vw - 48px,1040px) - 100vw)/2);
  background: linear-gradient(145deg,#211714 8%,#392017 53%,#171613 100%);
  pointer-events: none
}

.cinema:after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc((min(100vw - 48px,1040px) - 100vw)/2);
  background-image: linear-gradient(#f7dab90b 1px,transparent 1px),linear-gradient(90deg,#f7dab90b 1px,transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent);
  pointer-events: none
}

.cinema-heading {
  display: grid;
  grid-template-columns: 1fr .78fr;
  gap: 5%;
  align-items: end;
  margin-bottom: 32px
}

.cinema-heading h2 {
  font: 600 clamp(42px,7.5vw,91px)/.99 Georgia,serif;
  letter-spacing: -.065em;
  margin: 0;
  color: #ffebd1
}

.cinema-heading h2 em {
  color: #f1aa72;
  font-weight: 400
}

.cinema-heading>div:last-child p {
  font-size: 16px;
  line-height: 1.7;
  color: #e5cfc1;
  max-width: 380px;
  margin: 0 0 18px
}

.film-controls {
  display: flex;
  gap: 8px
}

.film-controls button {
  border: 1px solid #f7d5ae83;
  color: #fff4e6;
  background: #5b352580;
  border-radius: 50%;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  transition: background .25s,transform .25s
}

.film-controls button:hover {
  transform: scale(1.08);
  background: #a84328
}

.film-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  padding: 3px 3px 22px;
  overscroll-behavior-x: contain;
  scrollbar-color: #ba6d49 #241c17
}

.film-card {
  position: relative;
  flex: 0 0 min(430px,78vw);
  min-height: 490px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 29px;
  border: 1px solid #ecc49b52;
  border-radius: 3px 45px 3px 3px;
  background: radial-gradient(circle at 80% 15%,#9c54365f,transparent 38%),linear-gradient(135deg,#493025,#211e1a 70%);
  box-shadow: 0 15px 50px #0002;
  transition: transform .5s cubic-bezier(.2,.7,.2,1),border-color .4s
}

.film-card:nth-child(2) {
  background: radial-gradient(circle at 72% 20%,#a4937757,transparent 45%),linear-gradient(140deg,#42413a,#201d19 75%)
}

.film-card:nth-child(3) {
  background: radial-gradient(circle at 78% 20%,#9d43395e,transparent 40%),linear-gradient(140deg,#4b2922,#1d1b19 80%)
}

.film-card:nth-child(4) {
  background: radial-gradient(circle at 80% 20%,#90724857,transparent 42%),linear-gradient(135deg,#3d382e,#1e1a1b 75%)
}

.film-card:hover {
  transform: translateY(-5px);
  border-color: #f7ce99bd
}

.film-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(90deg,#f6dfc6 0 13px,#9b4630 13px 25px,#f6dfc6 25px 38px,#39211a 38px 47px);
  opacity: .7
}

.film-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .17em;
  color: #f8c899;
  text-transform: uppercase;
  font-weight: 700
}

.film-card .film-year {
  font: 400 clamp(84px,12vw,132px)/1 Georgia,serif;
  color: #f2b88738;
  letter-spacing: -.1em;
  margin: 39px 0 12px;
  transition: transform .6s
}

.film-card:hover .film-year {
  transform: translateX(9px)
}

.film-card h3 {
  font: 600 clamp(31px,3vw,42px)/1.12 Georgia,serif;
  letter-spacing: -.04em;
  margin: 0 0 15px;
  color: #fff3e5
}

.film-card p {
  font-size: 15px;
  line-height: 1.65;
  color: #e4d0c2;
  margin: 0 0 25px
}

.film-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto
}

.film-card-actions a,.film-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 15px;
  border: 1px solid #f9d1a974;
  border-radius: 100px;
  color: #fff1dd;
  background: #392820ad
}

.film-card-actions button {
  background: #d37545;
  color: #211711;
  border: 0
}

.film-card-actions a:hover,.film-card-actions button:hover {
  background: #f1c899;
  color: #291a16
}

.cinema-note {
  font-size: 13px;
  color: #d0b3a2;
  margin: 12px 0 0
}

.remembrance {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,.78fr) minmax(0,1fr);
  gap: 6%;
  align-items: center;
  margin: 90px 0 115px;
  padding: 38px;
  border: 1px solid #ecc39466;
  border-radius: 4px 82px 4px 4px;
  background: radial-gradient(circle at 85% 55%,#923f1f5a,transparent 38%),linear-gradient(140deg,#32231d,#1d1a17 65%);
  overflow: hidden
}

.remembrance:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(90deg,#ffc8870b 1px,transparent 1px);
  background-size: 40px 100%;
  mask-image: linear-gradient(90deg,transparent 45%,#000 100%);
  pointer-events: none
}

.remembrance-portrait {
  margin: 0;
  position: relative;
  min-height: 540px;
  align-self: stretch;
  overflow: hidden;
  border-radius: 2px 60px 2px 2px
}

.remembrance-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 48% 18%;
  filter: sepia(.14) saturate(.75);
  transition: transform 1.1s cubic-bezier(.17,.7,.2,1)
}

.remembrance-portrait:hover img {
  transform: scale(1.045)
}

.remembrance-portrait:after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent,#130e0dc9);
  pointer-events: none
}

.remembrance-portrait figcaption {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  bottom: 16px;
  color: #fff2e6;
  font-size: 12px;
  line-height: 1.4
}

.remembrance-copy h2 {
  font: 500 clamp(37px,5vw,60px)/1.1 Georgia,serif;
  letter-spacing: -.045em
}

.remembrance-copy>p:not(.section-tag):not(.diya-note) {
  font-size: 16px;
  line-height: 1.75;
  color: #e1cbbc;
  max-width: 520px
}

.remembrance-copy a {
  color: #ffd29b;
  text-underline-offset: 4px
}

.diya-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 19px 0 7px;
  padding: 12px 21px 12px 13px;
  background: #ffe0ad;
  color: #301c13;
  border: 1px solid #fce3bd;
  border-radius: 100px;
  font-weight: 700;
  box-shadow: 0 3px 26px #e9893b4a;
  transition: box-shadow .5s,transform .3s
}

.diya-button span {
  font-size: 27px;
  line-height: 1
}

.diya-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px #f5a95b86
}

.remembrance.is-lit .diya-button {
  box-shadow: 0 0 20px #ffbc72,0 0 75px #dd6b3180
}

.diya-button[aria-pressed=true] {
  background: #f5bf83
}

.remembrance .diya-note {
  min-height: 24px;
  color: #debfa8;
  font-size: 13px;
  margin: 4px 0 0
}

.remembrance .remembrance-source {
  display: inline-block;
  font-size: 13px;
  margin-top: 12px
}

.archive-chat-launcher {
  position: fixed;
  z-index: 60;
  left: 23px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border: 1px solid #f4d3a2af;
  border-radius: 100px;
  color: #fff3e5;
  background: #31201de9;
  box-shadow: 0 10px 45px #0009;
  backdrop-filter: blur(16px);
  font-weight: 700;
  font-size: 13px;
  transition: transform .25s,background .25s
}

.archive-chat-launcher:hover {
  transform: translateY(-4px);
  background: #6a3628
}

.archive-chat-launcher[aria-expanded=true] {
  display: none
}

.archive-chat-launcher span:first-child {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg,#ffdfad,#b54a2d);
  color: #321914;
  font-size: 18px;
  box-shadow: 0 0 18px #e7a7748c;
  animation: guideBreathe 3s ease-in-out infinite
}

.archive-chat {
  position: fixed;
  z-index: 65;
  left: 22px;
  bottom: 22px;
  width: min(410px,calc(100vw - 32px));
  height: min(615px,calc(100dvh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #edbd8d85;
  border-radius: 15px 32px 15px 15px;
  background: #241b18f9;
  box-shadow: 0 25px 80px #000c;
  backdrop-filter: blur(20px);
  color: #fff0dc
}

.archive-chat[hidden] {
  display: none
}

.archive-chat-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 15px;
  border-bottom: 1px solid #fff0d62c;
  background: linear-gradient(95deg,#5f3428,#2b201d)
}

.archive-chat-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1bc81;
  color: #3b2216;
  font-size: 20px;
  flex: none
}

.archive-chat-heading {
  min-width: 0;
  flex: 1;
  line-height: 1.25
}

.archive-chat-heading strong {
  display: block;
  font: 600 19px Georgia,serif
}

.archive-chat-heading small {
  display: block;
  color: #edd1b5;
  font-size: 11px;
  margin-top: 3px
}

.archive-chat-close,.archive-chat-drag {
  display: grid;
  place-items: center;
  border: 1px solid #ffffff4c;
  border-radius: 50%;
  background: #ffffff13;
  color: #fff3e4;
  width: 31px;
  height: 31px;
  flex: none;
  font-size: 18px;
  line-height: 1
}

.archive-chat-close:hover,.archive-chat-drag:hover {
  background: #f0bd8a;
  color: #241811
}

.archive-chat-drag {
  font-size: 14px;
  cursor: grab;
  touch-action: none
}

.archive-chat-drag:active {
  cursor: grabbing
}

.archive-chat-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px 15px;
  scrollbar-color: #9b5a40 #231916
}

.archive-chat-intro {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #d8bda6
}

.archive-chat-log {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px
}

.chat-message {
  max-width: 95%;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 13px;
  background: #493126;
  color: #fff0df
}

.chat-message.user {
  align-self: flex-end;
  background: #d4a371;
  color: #281914
}

.chat-message p {
  margin: 0
}

.chat-message .chat-message-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #eec49b;
  font-weight: 700
}

.chat-message.user .chat-message-label {
  color: #63351b
}

.chat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px
}

.chat-sources a,.chat-sources button {
  display: inline-block;
  border: 1px solid #f4ce9a90;
  border-radius: 100px;
  background: #3a2922;
  color: #ffe0b0;
  text-decoration: none;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700
}

.chat-sources button {
  background: #f2c28f;
  color: #2b1b16
}

.chat-sources a:hover,.chat-sources button:hover {
  background: #fff0d6;
  color: #321d14
}

.archive-chat-bottom {
  border-top: 1px solid #fff0d62c;
  padding: 12px 14px 13px;
  background: #271d19
}

.chat-prompts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin
}

.chat-prompts button {
  flex: none;
  font-size: 11px;
  border: 1px solid #bd836453;
  border-radius: 100px;
  background: #ffffff0b;
  color: #e8d2bf;
  padding: 6px 10px
}

.chat-prompts button:hover {
  background: #a25435;
  color: #fff
}

.archive-chat-form {
  display: flex;
  gap: 7px
}

.archive-chat-form input {
  flex: 1;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid #edba8b68;
  color: #fff3e6;
  background: #160f0e;
  padding: 11px;
  font: inherit;
  font-size: 14px
}

.archive-chat-form input::placeholder {
  color: #bca797
}

.archive-chat-form button {
  border: 0;
  border-radius: 9px;
  background: #f3c38d;
  color: #2b1710;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700
}

.archive-chat-form button:hover {
  background: #ffe0a9
}

.chat-disclosure {
  color: #e0c8b4;
  font-size: 12px;
  line-height: 1.4;
  margin: 9px 1px 0
}

@keyframes guideBreathe {
  50% {
    box-shadow: 0 0 30px #f4ab6bd1;
    transform: scale(1.06)
  }
}

@media(prefers-reduced-motion:no-preference) {
  .film-card.film-enter {
    opacity: .16;
    transform: translateY(24px) scale(.98)
  }
  .film-card.film-enter.is-in-view {
    opacity: 1;
    transform: none
  }
  .remembrance.memory-enter {
    opacity: .4;
    transform: translateY(28px);
    transition: opacity .75s,transform .75s
  }
  .remembrance.memory-enter.is-in-view {
    opacity: 1;
    transform: none
  }
}

@media(max-width:760px) {
  .cinema {
    margin: 80px 0
  }
  .cinema-heading {
    grid-template-columns: 1fr;
    gap: 20px
  }
  .cinema-heading h2 {
    font-size: clamp(43px,9vw,72px)
  }
  .film-card {
    min-height: 470px
  }
  .remembrance {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 25px;
    border-radius: 4px 58px 4px 4px
  }
  .remembrance-portrait {
    height: 420px;
    min-height: 0;
    align-self: auto
  }
  .remembrance-portrait img {
    object-position: center 20%
  }
}

@media(max-width:540px) {
  .nav a:nth-child(1),.nav a:nth-child(4) {
    display: none
  }
  .nav a:nth-child(3) {
    display: inline-flex
  }
  .nav {
    gap: 4px
  }
  .nav a {
    font-size: 10px;
    padding: 7px 9px
  }
  .film-card {
    flex-basis: min(350px,84vw);
    min-height: 460px;
    padding: 24px
  }
  .film-card .film-year {
    font-size: 99px
  }
  .film-card p {
    font-size: 14px
  }
  .film-card-actions {
    gap: 7px
  }
  .film-card-actions a,.film-card-actions button {
    font-size: 12px;
    padding: 7px 12px
  }
  .remembrance {
    margin: 75px 0
  }
  .remembrance-portrait {
    height: 370px
  }
  .remembrance-copy h2 {
    font-size: 38px
  }
  .archive-chat-launcher {
    left: 10px;
    bottom: 10px;
    padding: 7px 10px 7px 7px;
    font-size: 11px
  }
  .archive-chat-launcher span:first-child {
    width: 32px;
    height: 32px
  }
  .archive-chat {
    left: 0!important;
    right: 0;
    bottom: 0!important;
    top: auto!important;
    width: 100%;
    height: min(650px,92dvh);
    border-radius: 22px 22px 0 0
  }
  .archive-chat-drag {
    display: none
  }
  body:has(.dock:not([hidden])) .archive-chat-launcher {
    bottom: calc(10px + min(265px,35vh))
  }
}

@media(max-width:540px) {
  body:has(.dock:not([hidden])) .archive-chat-launcher {
    bottom: calc(10px + min(365px,47vh))
  }
  body:has(.dock.expanded:not([hidden])) .archive-chat-launcher {
    display: none
  }
}

@media(prefers-reduced-motion:reduce) {
  .archive-chat-launcher span:first-child {
    animation: none
  }
  .film-card,.film-card .film-year,.remembrance-portrait img {
    transition: none
  }
}
