.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .mobile-sort-control:not([hidden]) {
  display: block;
  min-width: 70px;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-toggle {
  min-height: 32px;
  max-width: 120px;
  padding: 5px 9px;
  font-size: 0.84rem;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-toggle[aria-expanded="true"] {
  color: #fff;
  background: var(--primary);
  box-shadow: none;
  transform: translateY(-1px);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-toggle:hover {
  color: #fff;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-toggle:hover,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-toggle:focus-visible {
  box-shadow: none;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .custom-select-mobile-sort .custom-select-menu {
  right: auto;
  left: 0;
  min-width: 150px;
  max-height: min(55vh, 360px);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap table {
  display: block;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap table,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody {
  width: 100%;
  min-width: 0;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap thead {
  display: none;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody tr {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 12px 10px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody tr:hover {
  background: var(--card);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td {
  min-width: 0;
  padding: 0;
  grid-column: span 3;
  text-align: left;
  overflow-wrap: anywhere;
  border: 0;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td::before {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  content: attr(data-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .category-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .xinrui-cell {
  grid-column: 1 / -1;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td.publisher-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td.country-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td.index-cell {
  grid-column: span 2;
  grid-row: 2;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .jif-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .five-year-jif-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .articles-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody td.mobile-card-action {
  grid-column: span 2;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-cell {
  grid-row: 1;
  padding-right: 88px;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .similarity-cell {
  z-index: 1;
  grid-column: 5 / -1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .similarity-cell::before {
  display: block;
  margin-bottom: 2px;
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-name,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-meta,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-abbr,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-identifiers,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .publisher-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .category-list {
  max-width: none;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-name {
  font-size: 0.94rem;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-abbr,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .journal-identifiers {
  font-size: 0.72rem;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .publisher-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .country-cell {
  font-size: 0.8rem;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .jif-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .five-year-jif-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .articles-cell,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .mobile-card-action {
  padding-top: 9px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .jif-cell::before,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .five-year-jif-cell::before,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .articles-cell::before,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .mobile-card-action::before {
  text-align: center;
}

.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .medsci-link,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .shengxin-link,
.results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap .bing-link {
  justify-content: center;
  font-size: 0.72rem;
  white-space: normal;
}

@media (min-width: 721px) {
  .results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .results-section[data-results-view="cards"]:not(.is-results-fullscreen) .xinrui-cell {
    min-width: 0;
  }

  .results-section[data-results-view="cards"]:not(.is-results-fullscreen) .xinrui-partition {
    flex-wrap: wrap;
  }

  .results-section[data-results-view="cards"]:not(.is-results-fullscreen) .xinrui-subject {
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

@media (min-width: 1101px) {
  .results-section[data-results-view="cards"]:not(.is-results-fullscreen) .table-wrap tbody {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .results-section.is-results-fullscreen .table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .results-section.is-results-fullscreen .results-heading {
    position: static;
  }

  .results-section.is-results-fullscreen .result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    width: 100%;
    align-items: center;
    gap: 8px;
  }

  .results-section.is-results-fullscreen .mobile-sort-control {
    display: none !important;
  }

  .results-section.is-results-fullscreen .results-fullscreen-button {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  .results-section.is-results-fullscreen #exportCsv {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .results-section.is-results-fullscreen #copySearchLink {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .results-section.is-results-fullscreen .table-wrap > table {
    display: table;
  }

  .results-section.is-results-fullscreen .table-wrap thead {
    display: table-header-group;
  }

  .results-section.is-results-fullscreen .table-wrap tbody {
    display: table-row-group;
    width: auto;
  }

  .results-section.is-results-fullscreen .table-wrap tbody tr {
    display: table-row;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .results-section.is-results-fullscreen .table-wrap tbody td {
    display: table-cell;
    min-width: 0;
    padding: 13px 12px;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: normal;
    border-top: 0;
    border-bottom: 1px solid var(--border);
  }

  .results-section.is-results-fullscreen .table-wrap tbody td::before {
    display: none;
  }

  .results-section.is-results-fullscreen .table-wrap tbody td.number-cell {
    text-align: right;
  }

  .results-section.is-results-fullscreen .xinrui-header,
  .results-section.is-results-fullscreen .xinrui-cell {
    min-width: 150px;
  }

  .results-section.is-results-fullscreen .xinrui-partition {
    flex-wrap: nowrap;
  }

  .results-section.is-results-fullscreen .xinrui-subject {
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .results-section.is-results-fullscreen .journal-name,
  .results-section.is-results-fullscreen .journal-meta,
  .results-section.is-results-fullscreen .journal-abbr,
  .results-section.is-results-fullscreen .journal-identifiers {
    max-width: 280px;
  }

  .results-section.is-results-fullscreen .publisher-cell {
    max-width: 190px;
  }

  .results-section.is-results-fullscreen .category-list {
    max-width: 300px;
  }

  .results-section.is-results-fullscreen .medsci-link,
  .results-section.is-results-fullscreen .shengxin-link,
  .results-section.is-results-fullscreen .bing-link {
    justify-content: flex-start;
    font-size: inherit;
    white-space: nowrap;
  }
}
