* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, #2b2520 0, #13100e 68%),
    #13100e;
}

.example-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 10px;
}

.loading-folio {
  position: relative;
  width: 800px;
  height: 600px;
  overflow: hidden;
  isolation: isolate;
  background: #d5c39d;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(176, 142, 91, 0.25);
}

.folio-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.study-stage {
  position: absolute;
  z-index: 2;
  top: 181px;
  left: 254px;
  width: 292px;
  height: 292px;
  margin: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.study-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 292px;
  height: 292px;
  object-fit: contain;
  opacity: 0;
  transform: scale(var(--study-scale, 1));
  transform-origin: center;
  transition: opacity 560ms ease-in-out;
  will-change: opacity;
}

.study-image.active {
  opacity: 0.96;
}

.sequence-strip {
  position: absolute;
  z-index: 4;
  left: 214px;
  bottom: 90px;
  width: 378px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  padding: 4px 3px;
  border: 1px solid rgba(65, 47, 34, 0.62);
  background: rgba(216, 199, 160, 0.94);
  box-shadow:
    0 1px rgba(255, 246, 220, 0.42),
    0 0 8px rgba(211, 190, 148, 0.75);
  transform: rotate(0.12deg);
}

.sequence-strip i {
  display: block;
  border-right: 1px solid rgba(83, 61, 45, 0.17);
  background: rgba(67, 51, 39, 0.07);
  transition:
    background-color 180ms ease,
    opacity 180ms ease;
}

.sequence-strip .pending {
  background:
    linear-gradient(
      135deg,
      transparent 44%,
      rgba(88, 66, 49, 0.2) 46% 52%,
      transparent 54%
    ),
    rgba(67, 51, 39, 0.04);
}

.sequence-strip .filled {
  opacity: 0.87;
}

.sequence-strip .tone-1 { background: #203f64; }
.sequence-strip .tone-2 { background: #355f83; }
.sequence-strip .tone-3 { background: #8f2d2b; }
.sequence-strip .tone-4 { background: #b85a38; }
.sequence-strip .tone-5 { background: #d7b473; }
.sequence-strip .tone-6 { background: #746384; }

.statement-patch {
  position: absolute;
  z-index: 5;
  left: 205px;
  bottom: 38px;
  width: 430px;
  min-height: 47px;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 7px 18px 8px;
  color: #2d231d;
  text-align: center;
  font: italic 14px/1.28 Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
  text-shadow: 0 1px rgba(255, 247, 225, 0.45);
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(211, 192, 153, 0.96) 8% 92%,
      transparent
    ),
    repeating-linear-gradient(
      1deg,
      rgba(87, 61, 38, 0.035) 0 1px,
      rgba(238, 220, 181, 0.06) 2px 4px
    );
  border-top: 1px solid rgba(67, 48, 35, 0.3);
  border-bottom: 1px solid rgba(67, 48, 35, 0.24);
  box-shadow: 0 0 15px rgba(202, 181, 139, 0.75);
  transform: rotate(-0.2deg);
  animation: statement-arrives 650ms ease-out both;
}

@keyframes statement-arrives {
  from { opacity: 0; }
  to { opacity: 1; }
}

.statement-patch::before,
.statement-patch::after {
  content: "";
  position: absolute;
  width: 35px;
  border-top: 1px solid rgba(75, 54, 39, 0.28);
}

.statement-patch::before { left: -24px; }
.statement-patch::after { right: -24px; }

.screen-reader-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 820px), (max-height: 620px) {
  .loading-folio {
    transform: scale(min(calc((100vw - 20px) / 800), calc((100vh - 20px) / 600)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .statement-patch {
    animation: none;
    opacity: 1;
  }

  .study-image {
    transition: none;
  }
}
