.history-demo {
  position: relative;
  height: 100%;
  padding: 24px 17px 52px;
  outline-offset: -4px;
  color: #4d617a;
  background: linear-gradient(145deg, #e5edf8, #eff2f7);
}
.history-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #bbc9dd;
  border-radius: 12px;
  box-shadow: 0 8px 25px #29476c17;
  overflow: hidden;
}
.history-topbar {
  display: grid;
  grid-template-columns: 26% 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  padding: 0 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 8px;
  color: #8796a9;
}
.history-topbar strong {
  font-size: 11px;
  color: #4d596a;
  font-weight: 550;
}
.history-topbar strong > span {
  font-size: 9px;
  color: #91a0b4;
  margin-left: 8px;
}
.history-current-name {
  color: #5a6b81;
}
.history-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.history-thumbs {
  width: 24%;
  flex-shrink: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  padding: 8px;
  gap: 6px;
  border-right: 1px solid #dae3ef;
  background: #fbfcfe;
}
.history-thumb {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 4px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  background: none;
  text-align: left;
}
.history-thumb img {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  background: #f0f3f8;
  border-radius: 3px;
}
.history-thumb > span {
  font-size: 7px;
  color: #8b98aa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 3px;
}
.history-thumb i {
  font-style: normal;
  visibility: hidden;
  font-size: 7px;
  color: white;
  background: #1682ff;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  text-align: center;
}
.history-thumb.is-selected {
  border-color: #1677f8;
  background: #e5efff;
}
.history-thumb.is-selected i {
  visibility: visible;
}
.history-main-image {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 20px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-selected-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.history-image-note {
  position: absolute;
  bottom: 7px;
  right: 10px;
  font-size: 7px;
  color: #a4afbf;
}
.history-app-footer {
  height: 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid #e5eaf2;
  font-size: 7px;
  color: #8b9aaf;
}
.history-app-footer b {
  font-weight: 400;
  margin-left: 7px;
}
.history-lightbox {
  position: absolute;
  inset: 12px 10px 49px;
  z-index: 4;
  background: #fbfcff;
  border: 1px solid #a9bad0;
  border-radius: 13px;
  box-shadow: 0 15px 35px #193a6d38;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: history-preview-in 0.35s var(--ease);
}
.history-preview-header {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid #e0e7f1;
  background: linear-gradient(#fafcfe, #edf2f8);
  font-size: 9px;
  color: #7286a3;
}
.history-preview-close {
  width: 27px;
  height: 27px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 19px;
  color: #7a8ca7;
  border-radius: 50%;
}
.history-preview-close:hover {
  background: #dfe8f6;
}
.history-large-image {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 9px;
}
.history-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  min-height: 27px;
  padding: 0 15px;
  border-top: 1px solid #e2e8f1;
  color: #899ab1;
}
.history-demo-footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
}
.history-space {
  font-size: 10px;
  border: 1px solid #cdd9e9;
  border-bottom-width: 3px;
  border-radius: 5px;
  padding: 5px 11px;
  background: #fff;
  color: #6d83a0;
  transition:
    background 0.15s,
    transform 0.15s;
}
.history-space.is-pressed {
  background: #dceaff;
  color: #1677f8;
  transform: translateY(2px);
  border-bottom-width: 1px;
}
.history-demo-caption {
  font-size: 9px;
  color: #8395af;
  flex: 1;
}
.history-auto-toggle,
.history-replay {
  padding: 5px 7px;
  font-size: 8px;
  color: #6684ab;
  background: #fff9;
  border: 1px solid #fff;
  border-radius: 5px;
}
.history-demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px white);
}
.history-demo-cursor svg {
  width: 18px;
  height: 21px;
  stroke: #253950;
  fill: white;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.history-demo-cursor.is-away {
  opacity: 0;
}
.history-demo-cursor i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 15px;
  height: 15px;
  border: 1px solid #3589fc;
  border-radius: 50%;
  opacity: 0;
}
.history-demo-cursor.is-clicking i {
  opacity: 1;
}
.mobile-history-demo {
  display: none;
}
@keyframes history-preview-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 900px) {
  .mobile-history-demo {
    display: block;
    margin-top: 24px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #dde6f2;
  }
  .mobile-history-demo .history-demo {
    height: 350px;
    padding: 16px 10px 52px;
  }
  .mobile-history-demo .history-topbar {
    grid-template-columns: 25% 1fr;
    gap: 6px;
    padding-inline: 8px;
  }
  .mobile-history-demo .history-topbar > span:last-child {
    display: none;
  }
  .mobile-history-demo .history-topbar strong {
    font-size: 9px;
  }
  .mobile-history-demo .history-thumbs {
    padding: 5px;
    gap: 4px;
    width: 27%;
  }
  .mobile-history-demo .history-thumb {
    padding: 3px;
  }
  .mobile-history-demo .history-thumb > span {
    font-size: 6px;
  }
  .mobile-history-demo .history-main-image {
    padding: 12px 8px;
  }
  .mobile-history-demo .history-demo-footer {
    gap: 5px;
    left: 10px;
    right: 10px;
  }
  .mobile-history-demo .history-demo-caption {
    font-size: 8px;
  }
  .mobile-history-demo .history-space {
    font-size: 9px;
    padding-inline: 7px;
  }
  .mobile-history-demo .history-app-footer {
    font-size: 6px;
    padding-inline: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .history-lightbox {
    animation: none;
  }
}
