#historico {
  --history-line: #5b8890;
  --history-accent: #76dfd7;
}
#historico h2 { max-width: none; font-size: clamp(1.9rem, 3.85vw, 3.95rem); margin-bottom: clamp(.8rem, 2.4vh, 1.25rem); }
.history-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, .88fr); gap: clamp(16px, 3vw, 46px); align-items: start; }
.history-visual { min-width: 0; }
.history-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2.2;
  max-height: max(185px, calc(100svh - 425px));
  border: 1px solid var(--history-line);
  border-radius: 13px;
  background: #112d3b;
}
.history-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  opacity: 0;
  transition: opacity .55s ease;
}
.history-image:first-child, .history-image.is-current { opacity: 1; }
.history-image.is-current { z-index: 1; }
.history-lens {
  --lens-color: #c6fbf6;
  --corner: clamp(10px, 1.4vw, 16px);
  position: absolute;
  z-index: 4;
  inset: 0 auto auto 0;
  width: clamp(58px, 8vw, 96px);
  aspect-ratio: 1.18;
  pointer-events: none;
  background:
    linear-gradient(var(--lens-color), var(--lens-color)) left top / var(--corner) 1.5px no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) left top / 1.5px var(--corner) no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) right top / var(--corner) 1.5px no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) right top / 1.5px var(--corner) no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) left bottom / var(--corner) 1.5px no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) left bottom / 1.5px var(--corner) no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) right bottom / var(--corner) 1.5px no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) right bottom / 1.5px var(--corner) no-repeat;
  filter: drop-shadow(0 1px 2px #061c26);
}
.history-lens::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 13px;
  aspect-ratio: 1;
  transform: translate(-50%,-50%);
  background:
    linear-gradient(var(--lens-color), var(--lens-color)) center / 1px 100% no-repeat,
    linear-gradient(var(--lens-color), var(--lens-color)) center / 100% 1px no-repeat;
}
.history-detail[data-reading] { position: relative; isolation: isolate; color: #e5f5f5; }
.history-detail[data-reading]::before {
  content: "";
  position: absolute;
  inset: -.24rem -.45rem -.24rem -.55rem;
  z-index: -1;
  border-left: 2px solid #7adfd2a0;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(90deg, #4db9b728, #45aeb509);
}
.history-detail[data-reading="scanning"]::before { animation: history-text-reveal 1s linear both; }
.history-detail[data-reading="scanning"]::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: -.53rem;
  height: 1px;
  background: linear-gradient(90deg, #b2f5eea0, transparent);
  pointer-events: none;
  animation: history-text-scan 1s linear both;
}
@keyframes history-text-reveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes history-text-scan {
  from { top: 0; opacity: .9; }
  80% { opacity: .65; }
  to { top: 100%; opacity: 0; }
}
.history-zoom {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: #132c36;
  animation: history-open-detail .54s ease-out both;
}
@keyframes history-open-detail {
  from { clip-path: circle(9% at var(--lens-x) var(--lens-y)); }
  to { clip-path: circle(145% at var(--lens-x) var(--lens-y)); }
}
.history-zoom-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  transform-origin: var(--lens-x) var(--lens-y);
  transform: translate(calc(50% - var(--lens-x)), calc(50% - var(--lens-y))) scale(var(--lens-zoom));
}
.history-tablet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  transform: translateY(-50%);
}
.history-tablet-photo { display: block; width: 100%; height: 100%; object-fit: fill; }
.history-tablet-screen {
  container-type: inline-size;
  position: absolute;
  inset: 24.75% auto auto 21.1%;
  width: 58.98%;
  height: 50.55%;
  overflow: hidden;
  border-radius: 1.5%;
  background: #fbfcfd;
  color: #132d3e;
  clip-path: polygon(0 0,100% 0,100% 100%,96% 100%,91% 92%,85.9% 81%,83.8% 78.7%,82% 79.8%,81.4% 82.9%,81.9% 89%,84% 95%,87% 100%,0 100%);
}
.history-tablet-bar { display: flex; align-items: center; gap: 3cqw; padding: 2.1cqw 4.4cqw; background: #102739; color: #f4fafa; line-height: 1; }
.history-tablet-bar strong { font-size: 4.8cqw; letter-spacing: -.03em; }
.history-tablet-bar span { color: #bddee0; font-size: 2.95cqw; }
.history-tablet-form { padding: 3.1cqw 4.4cqw 0; line-height: 1.2; }
.history-tablet-form > strong { display: block; font-size: 4.2cqw; }
.history-tablet-form dl { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5cqw 2.1cqw; margin: 2.2cqw 0 1.6cqw; }
.history-tablet-form dl > div { min-width: 0; }
.history-tablet-form dt { color: #4a6272; font-size: 2.45cqw; }
.history-tablet-form dd {
  margin-top: .45cqw;
  padding: .8cqw 1.15cqw;
  border: 1px solid #bfcecf;
  border-radius: .7cqw;
  background: #fff;
  color: #12333f;
  font-size: 2.65cqw;
  font-weight: 620;
}
.history-tablet-field dd { animation: history-field-entry .65s .6s ease-out both; }
@keyframes history-field-entry {
  from { opacity: .05; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.history-tablet-submit {
  display: inline-block;
  margin-left: 57%;
  padding: 1cqw 1.7cqw;
  border-radius: .9cqw;
  background: #0b7278;
  color: #fff;
  font-size: 2.45cqw;
  font-weight: 700;
}
.history-actions { display: flex; gap: .42rem; flex-wrap: wrap; }
.history-play.history-zoom-toggle { background: #103745; color: #d0fbf5; }

.history-visual figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; margin-top: .45rem; color: var(--muted); font-size: clamp(.72rem, 1.12vw, .89rem); }
.history-play { min-height: 32px; padding: .28rem .55rem; border: 1px solid #577f88; border-radius: 7px; background: #102e3d; color: #c6f3ee; font-size: .85rem; font-weight: 660; }
.history-play:hover { background: #204f58; color: #fff; }
.history-text { display: grid; align-content: start; gap: clamp(.85rem, 2.2vh, 1.35rem); min-width: 0; padding-top: clamp(.35rem, 1.3vh, .9rem); }
.history-date { color: var(--history-accent); font: 720 clamp(.86rem, 1.28vw, 1.09rem)/1.22 "IBM Plex Mono", Consolas, monospace; }
.history-record h3 { margin-top: .48rem; color: #f2f9fa; font-size: clamp(1.28rem, 2.65vw, 2.66rem); }
.history-detail { margin-top: .52rem; color: var(--muted); font-size: clamp(.88rem, 1.34vw, 1.13rem); line-height: 1.42; }
.history-record dl { margin-top: .7rem; }
.history-record dt { color: var(--muted); font-size: clamp(.72rem, 1.1vw, .88rem); }
.history-record dd { margin-top: .16rem; color: #e6f7f5; font-size: clamp(.86rem, 1.24vw, 1.03rem); font-weight: 720; }
.history-question { padding-left: .75rem; border-left: 2px solid var(--history-accent); color: #d6ebee; font-size: clamp(.9rem, 1.42vw, 1.16rem); line-height: 1.36; }
.history-track { --history-progress: 0%; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(.8rem, 2.5vh, 1.5rem); }
.history-track::before, .history-track::after { content: ""; position: absolute; top: 9px; height: 2px; left: 10%; border-radius: 8px; }
.history-track::before { width: 80%; background: var(--history-line); }
.history-track::after { width: var(--history-progress); background: var(--history-accent); transition: width .5s ease; }
.history-track button {
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  position: relative;
  min-width: 0;
  padding: 1.2rem .2rem .1rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: center;
}
.history-track button::before {
  content: "";
  position: absolute;
  top: 4px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border: 2px solid #a2c4ca;
  border-radius: 50%;
  background: #142c3a;
}
.history-track button[aria-pressed="true"] { color: #c1fff6; }
.history-track button:hover { color: #fff; }
.history-track button[aria-pressed="true"]::before { background: var(--history-accent); border-color: var(--history-accent); box-shadow: 0 0 0 4px #76dfd733; }
.history-track time { font-size: clamp(.98rem, 1.95vw, 1.55rem); font-weight: 780; line-height: 1.08; }
.history-track span { margin-top: .17rem; font-size: clamp(.72rem, 1.1vw, .92rem); line-height: 1.18; }
@media (max-width: 700px) {
  .history-layout { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .history-scene { aspect-ratio: 1.65; max-height: none; }
  .history-text { gap: .65rem; }
  .history-track span { display: none; }
}
@media print {
  .history-play { display: none; }
}
