#track { height: 4312svh; }
#tools-transition { top: 4053svh; }
#tools-sun { top: 4134svh; }
#tools-carousel { top: 4211svh; }

#tools-stage {
  --tools-inset: max(5vw, 22px);
  position: fixed;
  z-index: 16;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  color: #f7f2fc;
}
#tools-stage.active { visibility: visible; }
#tools-stage:not([inert]) { pointer-events: auto; }

.tools-backdrop, .tools-interface { position: absolute; inset: 0; opacity: 0; }
.tools-backdrop {
  background: radial-gradient(ellipse at 32% 16%, #251834 0, #15101e 37%, #0a080d 78%);
}
.tools-interface { display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 3.4svh, 32px); }
.tools-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-inline: var(--tools-inset);
}
.tools-header h2 {
  margin: 0;
  font-size: clamp(37px, 6.1vw, 100px);
  letter-spacing: -.064em;
  font-weight: 550;
  line-height: .98;
}
.tools-controls { display: flex; gap: 8px; }
.tools-controls button {
  width: 40px;
  height: 40px;
  color: #f4e9ff;
  padding: 0;
  background: #c5a5eb14;
  border: 1px solid #dcc2ff34;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tools-controls button:disabled { opacity: .33; cursor: default; }
.tools-controls button:focus-visible, .tools-track:focus-visible { outline: 2px solid #d2acf9; outline-offset: 3px; }

.tools-track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 26px);
  padding: 2px var(--tools-inset) 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--tools-inset);
}
.tools-track::-webkit-scrollbar { display: none; }
.tool-card {
  flex: 0 0 min(29vw, 44svh, 350px);
  min-width: 0;
  padding: 9px;
  border: 1px solid #d6b2fc33;
  border-radius: 21px;
  background: linear-gradient(145deg, #e8d4fe12 0%, #b697e30b 86%);
  scroll-snap-align: start;
  opacity: .84;
}
.tool-card.is-active { border-color: #dfb8ff8c; opacity: 1; }
.tool-media { background: #050408; border-radius: 14px; overflow: hidden; height: min(57svh, 550px); }
.tool-media video, .tool-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tool-copy { padding: 12px 7px 8px; }
.tool-copy h3 { margin: 0; font-size: clamp(18px, 1.75vw, 28px); font-weight: 570; letter-spacing: -.035em; line-height: 1.05; }
.tool-copy p { margin: 6px 0 0; color: #cbbcd7; font-size: clamp(13px, 1.1vw, 16px); line-height: 1.34; }

.tools-match-screen {
  position: absolute;
  opacity: 0;
  background: #060507 url("tools/sun-moscow.jpg") center / contain no-repeat;
  border-radius: clamp(10px, 2vw, 25px);
  box-shadow: 0 22px 76px #0009;
  z-index: 1;
}
.tools-glint {
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0;
  background: #ffe4a6;
  box-shadow: 0 0 7px 3px #f9b351ae, 0 0 34px 10px #efa95457;
}
@media (max-width: 759px) {
  #tools-stage { --tools-inset: 6vw; }
  .tools-interface { gap: 16px; }
  .tools-header h2 { font-size: clamp(34px, 8.8vw, 62px); }
  .tools-controls { gap: 5px; }
  .tools-controls button { width: 34px; height: 34px; font-size: 16px; }
  .tools-track { overflow: clip; scroll-snap-type: none; touch-action: pan-y; }
  .tool-card {
    flex-basis: 59vw;
    padding: 7px;
    border-radius: 19px;
    translate: var(--tools-offset, 0px) 0;
  }
  .tool-media { height: min(46svh, 450px); }
  .tool-copy { padding: 10px 7px 7px; }
}
@media (max-width: 350px) {
  .tools-controls button { width: 28px; height: 28px; }
  .tools-header h2 { font-size: 30px; }
}
