.idx-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  padding: 6px 4px 10px;
}

.idx-card {
  --rule: 28px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--bg);
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.08);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.idx-carousel .idx-card:hover,
.idx-carousel .idx-card:focus-within {
  transform: none;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.16);
}

.idx-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  font-size: 14px;
  font-weight: 700;
}

.idx-body {
  flex: 1;
  padding: 10px 14px 14px;
}

.idx-lines {
  background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1px), var(--line) 0);
  background-size: 100% var(--rule);
}

.idx-body .day-list,
.idx-body .tool-title,
.idx-body .tool-list li {
  margin-block: 0;
  line-height: var(--rule);
}

.idx-body .day-list .mono {
  line-height: 1;
}

.idx-body .tool-list li {
  height: var(--rule);
}

.idx-body .tool-list li > span {
  line-height: var(--rule);
}

.idx-body .tool-breakdown {
  margin-top: var(--rule);
  padding-top: 0;
  border-top: 0;
}

.idx-body .tool-title {
  margin-bottom: 0;
}

.idx-body .view-more {
  display: block;
  height: var(--rule);
  margin: 10px 0 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 26px;
  cursor: pointer;
}

.idx-body .view-more:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.idx-body .view-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.idx-carousel {
  position: relative;
}

.idx-arrow {
  display: none;
}

.tool-modal-card {
  padding: 0;
  overflow-x: hidden;
}

.tool-modal-body .idx-card,
.tool-modal-body .idx-card:hover,
.tool-modal-body .idx-card:focus-within {
  transform: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tool-modal-body .idx-strip {
  padding: 12px 52px 12px 18px;
  font-size: 15px;
}

.tool-modal-body .idx-body {
  padding: 12px 18px 18px;
}

.tool-modal-card .tool-modal-close {
  top: 7px;
  right: 10px;
  z-index: 1;
  color: var(--text);
}

@media (max-width: 980px) {
  .idx-cards--all {
    grid-template-columns: minmax(0, 1fr);
  }

  .idx-carousel .idx-cards {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scrollbar-width: none;
  }

  .idx-carousel .idx-cards::-webkit-scrollbar {
    display: none;
  }

  .idx-carousel .idx-card,
  .idx-carousel .idx-card:hover,
  .idx-carousel .idx-card:focus-within {
    transform: none;
    scroll-snap-align: start;
  }

  .idx-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 0 3px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
    font: 700 22px/1 "Lora", Georgia, "Times New Roman", serif;
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity 150ms ease;
  }

  .idx-arrow--prev {
    left: -6px;
  }

  .idx-arrow--next {
    right: -6px;
  }

  .idx-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    box-shadow: none;
  }

  .idx-arrow:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

@media (max-width: 520px) {
  .idx-carousel .idx-cards {
    grid-auto-columns: 85%;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .idx-card,
  .idx-card:hover,
  .idx-card:focus-within {
    transform: none;
    transition: none;
  }
}
