#identify-history-list-dialog.history-timeline {
  --history-timeline-surface: light-dark(#f3f7f6, #202d2a);
  --history-timeline-ink: light-dark(#20352d, #ecf3ee);
  --history-timeline-muted: light-dark(#4b6458, #a9c2b7);
  --history-timeline-rule: light-dark(#cbd9d2, #455e55);
  --history-timeline-rail: light-dark(#9aafa6, #607e73);
  --history-timeline-marker: light-dark(#538373, #9ec0b1);
  --history-timeline-inset: clamp(18px, 6vw, 27px);
  --history-timeline-rail-offset: 54px;
  --history-timeline-date-height: 39px;
  --history-timeline-month-width: 54px;
  --history-timeline-date-width: 90px;
  --history-timeline-row-height: 66px;
  inline-size: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: var(--history-timeline-ink);
}

#identify-history-list-dialog.history-timeline[open] {
  display: block;
  animation: none;
}

#identify-history-list-dialog.history-timeline::backdrop {
  background: transparent;
}

.app-shell:has(#identify-history-list-dialog[open]) {
  transform-origin: center top;
}

.app-shell[data-history-timeline-open] {
  transform: translateY(4px) scale(.98);
  transform-origin: center top;
}

.history-timeline-shade {
  position: absolute;
  inset: 0;
  background: #07110f;
  opacity: 0;
}

.history-timeline[data-timeline-ready] .history-timeline-shade {
  opacity: .42;
}

.history-timeline-panel {
  position: absolute;
  inset: max(25%, env(safe-area-inset-top, 0px)) 0 0;
  inset-block-end: var(--history-timeline-bottom, 0px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  inline-size: min(100%, var(--history-timeline-width, 760px));
  min-block-size: 0;
  padding-block: 9px env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
  border-radius: 26px 26px 0 0;
  background: var(--history-timeline-surface);
  box-shadow: 0 -12px 38px light-dark(#0e1d193f, #0308069e);
}

.history-timeline-panel:has(> .history-timeline-surface) {
  background: transparent;
}

.history-timeline-surface {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--history-timeline-surface);
  pointer-events: none;
}

.history-timeline .identify-history-list-heading {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px;
  min-block-size: 44px;
  padding: 0 max(14px, calc(var(--history-timeline-inset) - 7px)) 0 var(--history-timeline-inset);
  border-block-end: 0;
}

.history-timeline .identify-history-list-heading h2,
.history-timeline-heading-flight {
  font-size: var(--layout-heading, 22px);
  font-weight: 650;
  line-height: 1.3;
}

.history-timeline .identify-history-list-heading h2 {
  grid-column: 1;
  justify-self: start;
  color: var(--history-timeline-ink);
  text-align: start;
}

.history-timeline .identify-history-list-heading h2:focus {
  outline: none;
}

.history-timeline-heading-flight {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  pointer-events: none;
  white-space: nowrap;
}

#identify-history-list-dialog.history-timeline .app-history-clear {
  grid-column: 2;
  grid-row: 1;
  color: var(--history-timeline-muted);
}

#identify-history-list-dialog.history-timeline #identify-history-list-back {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  isolation: isolate;
  color: var(--history-timeline-ink);
}

#identify-history-list-dialog.history-timeline #identify-history-list-back::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px;
  border: 1.25px solid light-dark(#8ea69c, #809b8f);
  border-radius: 50%;
  background: light-dark(#f7fbf8, #2a3d35);
}

#identify-history-list-dialog.history-timeline .identify-history-list-heading button:not(:disabled):hover {
  background: transparent;
}

#identify-history-list-dialog.history-timeline #identify-history-list-back:hover::before {
  background: var(--accent-soft);
}

#identify-history-list-dialog .history-timeline-handle {
  position: absolute;
  z-index: 3;
  inset-block-start: 0;
  inset-inline-start: 50%;
  inline-size: 54px;
  block-size: 44px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  touch-action: none;
  cursor: grab;
}

#identify-history-list-dialog .history-timeline-handle:active {
  cursor: grabbing;
}

.history-timeline-handle::before {
  content: "";
  position: absolute;
  inset: 8px 10px auto;
  block-size: 4px;
  border-radius: 2px;
  background: light-dark(#a0b3a9, #82998c);
}

#identify-history-list-dialog .history-timeline-handle:focus-visible,
#identify-history-list-dialog .history-timeline-record > .identify-recent-record:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.history-timeline #identify-history-list-status {
  margin: 3px var(--history-timeline-inset) 0;
}

.history-timeline #identify-history-list {
  position: relative;
  padding: 0 var(--history-timeline-inset) 36px;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(#000 0 calc(100% - 32px), transparent);
  mask-image: linear-gradient(#000 0 calc(100% - 32px), transparent);
}

.history-timeline-group:not(:last-child) {
  margin-block-end: 19px;
}

.history-timeline-group + .history-timeline-group:last-child {
  min-block-size: calc(100% + var(--history-timeline-date-height));
}

.history-timeline-group > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  block-size: var(--history-timeline-date-height);
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-timeline-group:first-child > h3 {
  display: none;
}

.history-timeline-group > [data-same-month] .history-timeline-date__month,
.history-timeline-date__incoming[data-same-month] .history-timeline-date__month,
.history-timeline-group > [data-rolling] .history-timeline-date__value {
  visibility: hidden;
}

.history-timeline-track {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-timeline-date {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 var(--history-timeline-date-height);
  align-items: center;
  gap: 12px;
  min-inline-size: 0;
  block-size: var(--history-timeline-date-height);
  margin-inline: var(--history-timeline-inset);
  background: var(--history-timeline-surface);
  color: var(--history-timeline-ink);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: nowrap;
}

.history-timeline-date[hidden],
.history-timeline-date [hidden] {
  display: none;
}

.history-timeline-date__value {
  display: grid;
  grid-template-columns: var(--history-timeline-month-width) 1fr;
  flex: 0 0 var(--history-timeline-date-width);
  align-items: baseline;
}

.history-timeline-date__label-stack {
  position: relative;
  flex: 0 0 var(--history-timeline-date-width);
}

.history-timeline-date__incoming {
  position: absolute;
  inset: 0;
}

.history-timeline-date__month {
  font-size: 23px;
  line-height: 1;
}

.history-timeline-date__day {
  display: block;
}

.history-timeline-date__divider {
  flex: 1;
  block-size: 1px;
  background: var(--history-timeline-rule);
}

.history-timeline-date__trail {
  position: absolute;
  inset: 50% 0 auto calc(var(--history-timeline-date-width) + 12px);
  block-size: 1px;
  background: var(--history-timeline-rule);
  opacity: 0;
  pointer-events: none;
}

.history-timeline #identify-history-list .history-timeline-record {
  display: block;
  position: relative;
  min-inline-size: 0;
  block-size: var(--history-timeline-row-height);
  margin-block-end: 0;
}

.history-timeline-record:not(:last-child) > .history-timeline-dot::after {
  content: "";
  position: absolute;
  inset: 100% auto auto 50%;
  inline-size: 1px;
  block-size: calc(var(--history-timeline-row-height) - 7px);
  transform: translateX(-50%);
  background: var(--history-timeline-rail);
  pointer-events: none;
}

.history-timeline-dot {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: var(--history-timeline-rail-offset);
  inline-size: 7px;
  block-size: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--history-timeline-marker);
  pointer-events: none;
}

#identify-history-list-dialog.history-timeline .history-timeline-record > .identify-recent-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) clamp(50px, 17vw, 64px);
  grid-template-rows: minmax(0, 1fr);
  column-gap: calc(var(--history-timeline-rail-offset) * 2 - 84px);
  block-size: 100%;
  padding: 0;
  border-radius: 0;
  color: var(--history-timeline-ink);
}

.history-timeline #identify-history-list .identify-recent-record::before {
  content: none;
}

.history-timeline-record .identify-recent-meta {
  grid-area: 1 / 1;
  display: block;
  justify-content: start;
  font-variant-numeric: tabular-nums;
}

.history-timeline-record .identify-recent-meta small {
  color: var(--history-timeline-muted);
}

.history-timeline-record .identify-recent-copy {
  grid-area: 1 / 2;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 0;
  text-align: start;
}

.history-timeline-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.history-timeline-record .identify-recent-copy strong {
  max-inline-size: 100%;
  color: inherit;
  font-size: clamp(15px, 4.6vw, 17px);
  line-height: 1.2;
}

.history-timeline-record .identify-recent-copy svg {
  flex: none;
  inline-size: 10px;
  block-size: 10px;
  color: var(--history-timeline-muted);
}

.history-timeline-record .identify-recent-record > .identify-recent-thumbnail {
  grid-area: 1 / 3;
  position: static;
  inline-size: 100%;
  block-size: 49px;
  border-radius: 8px;
  mask-image: none;
  -webkit-mask-image: none;
}

.history-timeline-record img[data-history-thumbnail] { visibility: hidden; }

.history-timeline #identify-history-list:has(> .identify-recent-empty) {
  display: grid;
  grid-template-rows: minmax(1.3em, 58%);
  place-items: center;
  padding-block-end: 0;
  font-size: var(--layout-heading, 22px);
  -webkit-mask-image: none;
  mask-image: none;
}

.history-timeline #identify-history-list > .identify-recent-empty {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: 1.3;
  text-align: center;
}

.history-timeline-flight {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.history-timeline-flight > * {
  position: absolute;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

@media (max-width: 345px) {
  #identify-history-list-dialog.history-timeline {
    --history-timeline-rail-offset: 50px;
  }
}
