.rebt-cb-dir-page {
  max-width: 1280px;
  margin: 0 auto 64px;
  padding: 8px 0 0;
  overflow: visible;
}

.rebt-cb-dir-page__main,
.rebt-cb-dir__broker {
  overflow: visible;
}

.rebt-cb-dir-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rebt-cb-dir-page__side {
  position: sticky;
  top: 88px;
}

.rebt-cb-dir-page__title {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.3;
}

.rebt-cb-dir-page__lead {
  margin: 0 0 28px;
  color: var(--rebt-muted);
  line-height: 1.8;
}

.rebt-cb-dir__index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rebt-cb-dir__index-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 16px 12px;
  background: var(--rebt-white);
  border: 1px solid var(--rebt-bg-dim);
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--rebt-black-a12);
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.rebt-cb-dir__index-link:hover {
  border-color: var(--rebt-teal);
}

.rebt-cb-dir__index-name {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.rebt-cb-dir__index-link i {
  display: none;
}

.rebt-cb-dir__broker {
  margin-bottom: 28px;
  background: var(--rebt-white);
}

.rebt-cb-dir__broker.is-hidden,
.rebt-cb-dir__empty-filter {
  display: none;
}

.rebt-cb-dir__broker-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.rebt-cb-dir__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 48px;
  padding: 6px;
  background: var(--rebt-bg-soft);
  border-radius: 8px;
}

.rebt-cb-dir__logo img {
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
}

.rebt-cb-dir__more {
  display: inline-block;
  margin-top: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.rebt-cb-dir__table-frame {
  background: var(--rebt-white);
  timeline-scope: --cb-dir-x;
}

.rebt-cb-dir__table-head {
  position: sticky;
  top: var(--swl-sp-header-h, 0px);
  z-index: 6;
  overflow: hidden;
  background: var(--rebt-bg-soft);
  box-shadow: 0 1px 0 var(--rebt-line-soft);
}

.rebt-cb-dir__table-head-frozen {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  padding: 8px;
  background: var(--rebt-bg-soft);
  box-shadow: 4px 0 12px var(--rebt-black-a12);
  color: var(--rebt-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.rebt-cb-dir__table-head .rebt-cb-dir__table {
  margin: 0;
  table-layout: fixed;
}

.rebt-cb-dir__table-frame.is-css-x .rebt-cb-dir__table-head .rebt-cb-dir__table {
  animation: cb-dir-head-x linear both;
  animation-timeline: --cb-dir-x;
}

@keyframes cb-dir-head-x {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-1 * var(--cb-dir-max-x, 0px)), 0, 0);
  }
}

.rebt-cb-dir__table-head .rebt-cb-dir__table thead th:first-child {
  visibility: hidden;
}

.rebt-cb-dir__table-head .rebt-cb-dir__table tbody {
  visibility: collapse;
  line-height: 0;
}

.rebt-cb-dir__table-head .rebt-cb-dir__table tbody th,
.rebt-cb-dir__table-head .rebt-cb-dir__table tbody td {
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  overflow: hidden;
}

.rebt-cb-dir__table-wrap {
  margin: 0 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: var(--rebt-white);
  scroll-timeline-name: --cb-dir-x;
  scroll-timeline-axis: inline;
}

.rebt-cb-dir__table thead.is-cloned {
  display: none;
}

.rebt-cb-dir__table {
  width: auto;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--rebt-white);
}

.rebt-cb-dir__table th,
.rebt-cb-dir__table td {
  box-sizing: border-box;
  padding: 8px 8px;
  border-bottom: 1px solid var(--rebt-line-soft);
  text-align: center;
  vertical-align: middle;
  line-height: 1.35;
  color: inherit;
  background: var(--rebt-white);
}

.rebt-cb-dir__table td {
  white-space: nowrap;
}

.rebt-cb-dir__table thead th {
  z-index: 2;
  width: auto;
  min-width: 0;
  max-width: none;
  background: var(--rebt-bg-soft);
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: bottom;
}

.rebt-cb-dir__table thead th:first-child,
.rebt-cb-dir__table tbody th:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 80px;
  background: var(--rebt-white);
  box-shadow: 4px 0 12px var(--rebt-black-a12);
}

.rebt-cb-dir__table thead th:first-child {
  z-index: 4;
  background: var(--rebt-bg-soft);
}

.rebt-cb-dir__table thead th:first-child,
.rebt-cb-dir__table tbody th {
  text-align: left;
}

.rebt-cb-dir__table tbody th {
  font-weight: 600;
  white-space: normal;
}

.rebt-cb-dir__cat th {
  padding-top: 16px;
  background: var(--rebt-white);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.rebt-cb-dir__pair {
  display: block;
}

.rebt-cb-dir__symbol {
  display: block;
  color: var(--rebt-muted);
  font-size: 11px;
  font-weight: 400;
}

.rebt-cb-dir__note,
.rebt-cb-dir__empty {
  color: var(--rebt-muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1099px) {
  html:has(.rebt-cb-dir-page),
  body:has(.rebt-cb-dir-page) {
    background-color: var(--rebt-navy);
  }

  body:has(.rebt-cb-dir-page) footer#footer.l-footer {
    padding-bottom: calc(5em + env(safe-area-inset-bottom, 0px));
  }

  .rebt-cb-dir-page__layout {
    display: block;
  }

  .rebt-cb-dir-page__side {
    position: static;
    margin-top: 28px;
  }

  .rebt-cb-dir[data-cb-dir="single"] .rebt-cb-dir__table-frame {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

@media (max-width: 767px) {
  .rebt-cb-dir-page__title {
    font-size: 26px;
  }

  .rebt-cb-dir-page__side {
    margin-top: 0;
    height: 0;
    overflow: visible;
  }

  .rebt-cb-dir__index {
    grid-template-columns: 1fr;
  }
}
