.fichas-grid {
  display: grid;
  width: min(100%, 46rem);
  gap: 1.1rem;
  grid-template-columns: minmax(0, 1fr);
}

.fichas-destaque {
  width: min(100%, 22.5rem);
  margin: clamp(1.75rem, 4vw, 2.6rem) auto 0;
  scroll-margin-top: 1rem;
}

.fichas-carrossel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #bdcfdc;
  border-radius: 1rem;
  background: #112840;
  box-shadow: 0 .65rem 1.45rem #172d4819;
}

.fichas-trilho {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #8aaac0 #112840;
}

.fichas-trilho:focus-visible { outline-offset: -4px !important; }

.fichas-trilho.fichas-loop {
  scroll-snap-type: none;
  scrollbar-width: none;
}

.fichas-trilho.fichas-loop::-webkit-scrollbar { display: none; }
.fichas-folha[hidden], .fichas-pausa[hidden] { display: none; }

.fichas-folha {
  flex: 0 0 100%;
  min-width: 0;
  padding: clamp(.75rem, 2vw, 1.05rem);
  scroll-snap-align: start;
  background: radial-gradient(ellipse at 50% 5%, #315671, #173049 70%);
}

.fichas-folha a {
  display: block;
  max-width: 25rem;
  margin-inline: auto;
  border-radius: .4rem;
  background: #fff;
  box-shadow: 0 .36rem 1rem #08152775;
  cursor: zoom-in;
}

.fichas-folha a:focus-visible { outline-offset: 1px !important; }

.fichas-folha img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.fichas-controles {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .44rem;
  border-top: 1px solid #58738c;
  color: #eaf4fb;
}

.fichas-controles[hidden] { display: none; }

.fichas-controles button,
.fichas-dialogo button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #a4bdd0;
  border-radius: .48rem;
  background: #e9f3f9;
  color: #142d45;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.fichas-controles button:hover,
.fichas-dialogo button:hover { background: #ffdda0; }

.fichas-controles output {
  min-width: 3.4rem;
  text-align: center;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

.fichas-dialogo[open] {
  width: fit-content;
  max-width: calc(100% - 1.1rem);
  max-height: calc(100% - 1rem);
  overflow: auto;
  padding: .55rem;
  border: 1px solid #a6b9cc;
  border-radius: .65rem;
  margin: auto;
  background: #f7fafc;
}

.fichas-dialogo::backdrop { background: #071a2dd6; }

.fichas-dialogo img {
  display: block;
  width: min(100%, 43rem);
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  margin-inline: auto;
}

.fichas-dialogo button { display: block; margin: 0 0 .45rem auto; }

@media (min-width: 760px) {
  .fichas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .fichas-grid { max-width: 24rem; }
  .fichas-dialogo img { max-height: none; }
}
